|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.ide.editor.EditorManager
public abstract class EditorManager
The EditorManager serves as the registry for Editor that want to register themselves with specific Node types.
| Field Summary | |
|---|---|
static int |
SHOW_DROPDOWN_CMD_IDThe show dropdown command. |
| 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 | |
|---|---|
EditorManager() |
|
| Method Summary | |
|---|---|
abstract void |
activateCurrentEditorFrame()Activates the top-most editor frame and editor within it. |
abstract void |
activateEditor(EditorInfo editorInfo)Activates the editor corresponding to the editorInfo. |
abstract void |
addEditorListener(EditorListener listener)Adds a registered listener as an EditorListener. |
abstract void |
addLayoutListener(java.lang.String editorId, BaseLayoutListener listener)Add a LayoutListener for one of our child Editor instances |
abstract void |
closeEditors(java.util.List listEditors)Close the editors contained in the list. |
abstract void |
extend(EditorAddin addin, java.lang.Class[] types)Associate the Element types supported given with the given EditorAddin. |
abstract java.util.List |
findEditors(Context context) |
abstract java.util.List |
getAllEditors()Returns a list of all open Editor. |
abstract EditorAddin |
getBestEditorAddin(Node node)Retrieves the best EditorAddin based on the default editor preference for the Node, or by querying the editor addin registry. |
abstract ContextMenu |
getContextMenu()Get the ContextMenu to be shared by all Editors. |
abstract Editor |
getCurrentEditor()Returns the currently active editor. |
abstract EditorAddin |
getDefaultAddin(Element element)Gets the default registered EditorAddin for the element. |
abstract javax.swing.JComponent |
getDesktopComponent() |
abstract EditorAddin |
getEditorAddin(java.lang.Class cls)Get the EditorAddin instance which represents the Editor type provided. |
static EditorManager |
getEditorManager()Returns the EditorManager instance that is active in the IDE. |
abstract java.util.List |
getEditorsInfo() |
abstract EditorAddin[] |
getStaticAddins(java.lang.Class elementClass)Gets all the statically registered EditorAddins which are associated with the given Element class. |
abstract java.lang.Class[] |
getStaticElementTypes()Gets all the Element types which are associated with statically registered EditorAddins, excluding inherited EditorAddin associations. |
boolean |
hasEditors(Element element)Returns true if there are any registered editors for the specified element. |
abstract void |
initialize()Invoked by the AddinManager after the instance of the Addin is instantiated. |
abstract boolean |
isEditorRegistered(java.lang.Class cls)Determine whether an Editor implementation has been registered. |
abstract Editor |
openDefaultEditorInFrame(Context context)The new openEditor(oracle.ide.editor.OpenEditorOptions) is now the preferred way to open an editor. |
Editor |
openDefaultEditorInFrame(java.net.URL url)Open the specified URL using the default editor. |
abstract Editor |
openEditor(OpenEditorOptions openEditorOptions)Opens an editor. |
abstract Editor |
openEditorInFrame(java.lang.Class editorClass, Context context)The new openEditor(oracle.ide.editor.OpenEditorOptions) is now the preferred way to open an editor. |
abstract void |
register(EditorAddin addin, java.lang.Class[] types)Registers a EditorAddin for inclusion the editor tabs for the given Node types. |
abstract void |
registerDynamic(EditorAddin editorAddin)Registers a EditorAddin for possible inclusion the editor tabs. |
abstract void |
registerPreferredLayoutListener(java.lang.Class nodeClass, java.lang.Class editorClass, java.lang.String preferredLayoutBaseName, PreferredLayoutListener listener)Register a PreferredLayoutListener for the specified nodeClass. |
abstract void |
removeEditorListener(EditorListener listener)Removes a registered listener as an EditorListener. |
abstract void |
removeLayoutListener(java.lang.String editorId)Remove the LayoutListener for one of our child Editor instances |
abstract void |
replaceEditors(Context oldContext, Context newContext) |
abstract EditorPath |
searchEditor(Node node) |
static void |
setEditorManager(EditorManager editorManager)Publishes the specified EditorManager as the active instance in the IDE. |
abstract void |
setExplicit(Editor editor, boolean bExplicit)Set the editor as explicit or implicit. |
abstract void |
unregister(EditorAddin editorAddin)Removes the specified editorAddin from the list on known EditorAddins. |
abstract void |
unregisterDynamic(EditorAddin editorAddin)Removes the specificed editor addin from the list of dynamically registered addins. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface oracle.ide.controller.Controller |
|---|
handleEvent, update |
| Field Detail |
|---|
public static final int SHOW_DROPDOWN_CMD_ID
| Constructor Detail |
|---|
public EditorManager()
| Method Detail |
|---|
public static EditorManager getEditorManager()
public static void setEditorManager(EditorManager editorManager)
public abstract void register(EditorAddin addin,
java.lang.Class[] types)
EditorAddin for inclusion the editor tabs for the given Node types. The types array should contain the Class objects for each known Node type supported by the Editor represented by the EditorAddin being registered. If multiple Node types all extend a common class, only the Class object for that common class need be included in the Class array as retrievals will be attempted all the way up a given Node's inheritance path until a match can be found or the search fails.addin - the EditorAddin to registertypes - the Node classes supported by the addin being registeredpublic abstract void unregister(EditorAddin editorAddin)
editorAddin -public abstract void registerDynamic(EditorAddin editorAddin)
EditorAddin for possible inclusion the editor tabs. When a FlatEditorAddin is registered with this method, every time a Node is open, EditorAddin.getEditorWeight(oracle.ide.model.Element) is called to determine if and where the editor tab must be placed.
An addin can be registered both statically and dynamically. In that case, the dynamic addins will be queried only if they were not registered for the Node type.
editorAddin - the EditorAddin to registerpublic abstract void unregisterDynamic(EditorAddin editorAddin)
editorAddin -
public abstract void extend(EditorAddin addin,
java.lang.Class[] types)
addin - The EditorAddin to which the extension has been associated.types - The Element types being associated with addin.public abstract boolean isEditorRegistered(java.lang.Class cls)
cls - The Editor class upon which the query is being applied.public abstract EditorAddin getEditorAddin(java.lang.Class cls)
cls - the Editor class for which an EditorAddin is desired.public abstract EditorAddin getBestEditorAddin(Node node)
node - the current Nodepublic abstract EditorAddin getDefaultAddin(Element element)
element - the element for which a default is desired.public abstract EditorAddin[] getStaticAddins(java.lang.Class elementClass)
elementClass - the class of the Element.public abstract java.lang.Class[] getStaticElementTypes()
public abstract void addEditorListener(EditorListener listener)
listener - the listener to registerpublic abstract void removeEditorListener(EditorListener listener)
listener - the listener to de-registerpublic abstract void activateCurrentEditorFrame()
public Editor openDefaultEditorInFrame(java.net.URL url)
URL using the default editor. This will create a node for the file, and from that node, we can figure out what kind of editor we can open. This lets the NodeFactory take care of recognizing the file type.url - the URL of the file to openEditor instance that was openedpublic abstract Editor openDefaultEditorInFrame(Context context)
openEditor(oracle.ide.editor.OpenEditorOptions) is now the preferred way to open an editor. Replace
Editor editor = editorManager.openDefaultEditorInFrame(ctx);with
Editor editor = editorManager.openEditor(new OpenEditorOptions(ctx));Opens the specified file (context) using the default registered editor class for this node type. If the file is already open in another editor, this will just activate the current editor.
context - the context describing the node to openopenEditorInFrame( Class, Context )
public abstract Editor openEditorInFrame(java.lang.Class editorClass,
Context context)
openEditor(oracle.ide.editor.OpenEditorOptions) is now the preferred way to open an editor. Replace
Editor editor = editorManager.openEditorInFrame(cls, ctx);with
Editor editor = editorManager.openEditor(new OpenEditorOptions(ctx, cls));Opens the specified file (context) using the specified editor class (editorClass.) The new editor frame will be opened in the active editor tabbed frame (if one exists.) If there is no active editor desktop, or editor tabbed frame, one will be created automatically. If the editorClass does not correspond to any of the editorAddins declared for that context, the default editor will be used.
editorClass - the editor class to use for opening the nodecontext - the context describing the node to oenpublic abstract Editor openEditor(OpenEditorOptions openEditorOptions)
openDefaultEditorInFrame(java.net.URL) and #openEditorInFrame(java.lang.Class, oracle.ide.addin.Context) variants which will eventually be deprecatedopenEditorOptions -
public abstract void replaceEditors(Context oldContext,
Context newContext)
public abstract java.util.List findEditors(Context context)
public abstract java.util.List getAllEditors()
Editor.public abstract javax.swing.JComponent getDesktopComponent()
public abstract Editor getCurrentEditor()
public abstract void initialize()
AddinAddinManager after the instance of the Addin is instantiated. When invoked, The Addin should register and menu items, and actions required for use during this classes lifecycle. Addin authors should take care to ensure that any extraneous initialization is not preformed on this method, and any startup code that can be delayed until a later time is delayed, as the Addin's are synchronously initialized during the startup of the IDE, and each Addin has the potential to negatively impact the startup time of the product.initialize in interface AddinAddinManager
public abstract void addLayoutListener(java.lang.String editorId,
BaseLayoutListener listener)
LayoutListener for one of our child Editor instanceseditorId - the id of the editorlistener - the LayoutListener instancepublic abstract void removeLayoutListener(java.lang.String editorId)
LayoutListener for one of our child Editor instanceseditorId - the id of the editorpublic abstract ContextMenu getContextMenu()
public abstract void closeEditors(java.util.List listEditors)
listEditors - a List of Editor or EditorInfo.public abstract java.util.List getEditorsInfo()
EditorInfo.public abstract void activateEditor(EditorInfo editorInfo)
public abstract void setExplicit(Editor editor,
boolean bExplicit)
Note that the explicit/implicit behavior changed. The user now explicitely assigns accelerators to a Node and the "Close Implicit" command changed to only close the files that have no accelerator. This method will probably be deprecated soon.
public abstract void registerPreferredLayoutListener(java.lang.Class nodeClass,
java.lang.Class editorClass,
java.lang.String preferredLayoutBaseName,
PreferredLayoutListener listener)
PreferredLayoutListener for the specified nodeClass. When an editor belonging to a given editorClass opens a Node of type nodeClass the listener will be called. The listener is responsible for initializing the preferred layout. The preferredLayoutBaseName will be used as the name of the layout.public abstract EditorPath searchEditor(Node node)
public boolean hasEditors(Element element)
element - an element. Must not be null.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||