Extension SDK

oracle.ide.explorer
Interface ExplorerManager


public interface ExplorerManager

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.


Method Summary
 IconOverlayCache createOverlayCache()
          Creates an IconOverlayCache.
 TreeExplorer createTreeExplorer(Folder folder)
          Creates a TreeExplorer.
 IdeAction getAction(AddinManager mgr)
          Return the IdeAction to associate with the View | Explorer menu item.
 ContextMenu getContextMenu()
          Get the ContextMenu to be shared by all explorer windows.
 Explorer getExplorerForHost(View host, Context context)
          Gets the Explorer associated with the specified host within the given context.
 DockableWindow getSingletonView()
          Get the single explorer window when the ExplorerManager supports single explorer window.
 void initialize()
          Initialize the explorer window management.
 boolean isInMultiMode()
          true if this manager supports multiple explorer windows.
 boolean isViewVisible()
          Call this method to check the visible state of the explorer window when the ExplorerManager supports single explorer window.
 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.
 void showOrHideView(Context context)
          Call this method to show or hide the explorer window when the ExplorerManager supports single explorer window, or to show a new one when supporting multiple mode.
 boolean supportsStructure(View view)
          Returns true if the specified view supports exploring of its data.
 

Method Detail

supportsStructure

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


getContextMenu

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


register

public 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. An instance of the specified explorerType will be displayed in the Structure Window 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.

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

getExplorerForHost

public Explorer getExplorerForHost(View host,
                                   Context context)
Gets the Explorer associated with the specified host within the given context.


isInMultiMode

public boolean isInMultiMode()
true if this manager supports multiple explorer windows.


getAction

public IdeAction getAction(AddinManager mgr)
Return the IdeAction to associate with the View | Explorer menu item. This method is called when the main window is adding that menu item.


initialize

public void initialize()
Initialize the explorer window management. This method is called during the system startup process.


isViewVisible

public boolean isViewVisible()
Call this method to check the visible state of the explorer window when the ExplorerManager supports single explorer window.


getSingletonView

public DockableWindow getSingletonView()
Get the single explorer window when the ExplorerManager supports single explorer window.


showOrHideView

public void showOrHideView(Context context)
Call this method to show or hide the explorer window when the ExplorerManager supports single explorer window, or to show a new one when supporting multiple mode.


createTreeExplorer

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


createOverlayCache

public IconOverlayCache createOverlayCache()
Creates an IconOverlayCache. An overlay cache is used to manipulate explorer node overlay icons.


Extension SDK

 

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