|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.editor.EditorManager
The EditorManager
serves as the registry for
Editors
that want to register themselves with specific
Node
types.
Controller
,
Node
,
Editor
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. |
void |
addAutoSyncOption(java.lang.Class editorClass,
java.lang.String editorName,
javax.swing.Icon icon,
boolean defaultValue)
Deprecated. see isAutoSyncOn(oracle.ide.editor.Editor) |
void |
addAutoSyncOption(java.lang.String editorClass,
java.lang.String editorName,
ArrayResourceBundle bundle,
int key,
boolean defaultValue)
Deprecated. see isAutoSyncOn(oracle.ide.editor.Editor) |
void |
addAutoSyncOption(java.lang.String editorClass,
java.lang.String editorName,
javax.swing.Icon icon,
boolean defaultValue)
Deprecated. see isAutoSyncOn(oracle.ide.editor.Editor) |
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. |
void |
disable(Editor editor)
Deprecated. see isAutoSyncOn(oracle.ide.editor.Editor) |
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 . |
javax.swing.JInternalFrame[] |
getAllFrames()
Deprecated. Editor windowing is no longer based on Swing |
abstract ContextMenu |
getContextMenu()
Get the ContextMenu to be shared by all Editors. |
abstract Editor |
getCurrentEditor()
Returns the currently active editor. |
abstract EditorFrame |
getCurrentEditorFrame()
Returns the topmost editor frame. |
abstract EditorAddin |
getDefaultAddin(Element element)
Gets the default registered EditorAddin for the element. |
abstract javax.swing.JComponent |
getDesktopComponent()
|
javax.swing.JDesktopPane |
getDesktopPane()
Deprecated. Editor windowing is no longer based on Swing. |
abstract EditorFrame |
getEditorFrame(Editor editor)
Returns the frame containing the editor |
static EditorManager |
getEditorManager()
Returns the EditorManager instance that is active in the IDE. |
abstract java.util.List |
getEditorsInfo()
|
javax.swing.JMenu |
getMainSubmenu()
Deprecated. This menu no longer exists because the editors are now available in tabs |
javax.swing.JScrollPane |
getScrollPane()
Deprecated. Editor windowing is no longer based on Swing |
abstract void |
initialize()
When the application starts up, each module is given the opportunity to perform initialization tasks. |
boolean |
isAutoSyncOn(Editor editor)
Deprecated. autoSync no longer needs to be configurable by the user. Editor must implement editorHidden and editorShown to know if they need to refresh the UI. |
abstract boolean |
isEditorRegistered(java.lang.Class cls)
Determine whether an Editor implementation has been registered. |
abstract boolean |
isFlatEditor()
This temporary method returns true if we are running with the new editor manager mode |
boolean |
maySyncEditor(Editor editor)
Deprecated. see isAutoSyncOn(oracle.ide.editor.Editor) |
abstract Editor |
openDefaultEditorInFrame(Context context)
Opens the specified file (context) using the default registered editor class for this node type. |
Editor |
openDefaultEditorInFrame(Element element)
Deprecated. replaced by EditorUtil.openDefaultEditorInFrame(Element) |
Editor |
openDefaultEditorInFrame(Node node)
Deprecated. replaced by EditorUtil.openDefaultEditorInFrame(Node) |
Editor |
openDefaultEditorInFrame(java.net.URL url)
Open the specified URL using the default editor. |
Editor |
openDefaultEditorInFrameExternal(java.net.URL url)
Deprecated. replaced by EditorUtil.openDefaultEditorInFrame(URL) |
abstract Editor |
openEditorInFrame(java.lang.Class editorClass,
Context context)
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. |
abstract void |
register(EditorAddin addin,
java.lang.Class[] types)
Registers a EditorAddin for inclusion the editor tabs for the given
Document types. |
abstract void |
registerDynamic(FlatEditorAddin flatEditorAddin)
Registers a FlatEditorAddin for possible inclusion the editor tabs. |
abstract void |
registerPreferredLayoutListener(java.lang.Class docClass,
java.lang.Class editorClass,
java.lang.String preferredLayoutBaseName,
PreferredLayoutListener listener)
Register a PreferredLayoutListener for the specified
docClass . |
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 void |
saveWelcomeEditor(java.net.URL url,
java.lang.String editorClass,
Layout layout)
This method is called when JDeveloper is starting up to determine if a welcome editor should be displayed the first time JDeveloper is run after installation. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.ide.addin.Controller |
handleEvent, update |
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
Document
types.
The types array should contain the Class objects for each known Document
type supported by the Editor represented by the EditorAddin being
registered.
If multiple Document 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 Document's
inheritance path until a match can be found or the search fails.
addin
- the EditorAddin
to registertypes
- the Document
classes supported by the addin being registeredpublic abstract void registerDynamic(FlatEditorAddin flatEditorAddin)
FlatEditorAddin
for possible inclusion the editor tabs.
When a FlatEditorAddin is registered with this method, every time a Document
is open, FlatEditorAddin.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 document type.
flatEditorAddin
- the FlatEditorAddin
to registerpublic abstract void unregister(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 getDefaultAddin(Element element)
element
- the element for which a default is desired.
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 final Editor openDefaultEditorInFrameExternal(java.net.URL url)
EditorUtil.openDefaultEditorInFrame(URL)
URL
in its default Editor
, and add that item to the top-level 'Miscellaneous Files'
folder.This method is primarily used by the editor frame and desktop drag-and-drop code to handle files dropped from the O/S into the editor desktop area.
url
- the URL
of the item to open.
Editor
instance that was opened, or
null
if the operation failed.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 open
Editor
instance that was openedpublic final Editor openDefaultEditorInFrame(Element element)
EditorUtil.openDefaultEditorInFrame(Element)
element
- the Element
to open
public final Editor openDefaultEditorInFrame(Node node)
EditorUtil.openDefaultEditorInFrame(Node)
node
- the node to open
public abstract Editor openDefaultEditorInFrame(Context context)
context
- the context describing the node to open
openEditorInFrame( Class, Context )
public abstract Editor openEditorInFrame(java.lang.Class editorClass, Context context)
editorClass
- the editor class to use for opening the nodecontext
- the context describing the node to oen
public abstract void replaceEditors(Context oldContext, Context newContext)
public abstract java.util.List findEditors(Context context)
public abstract java.util.List getAllEditors()
Editor
.
public final javax.swing.JInternalFrame[] getAllFrames()
JInternalFrame
s.
public final javax.swing.JScrollPane getScrollPane()
public final javax.swing.JDesktopPane getDesktopPane()
getDesktopComponent()
public abstract javax.swing.JComponent getDesktopComponent()
public abstract EditorFrame getCurrentEditorFrame()
public abstract Editor getCurrentEditor()
public abstract EditorFrame getEditorFrame(Editor editor)
public abstract void saveWelcomeEditor(java.net.URL url, java.lang.String editorClass, Layout layout)
url
and specified editorClass
information should be saved in the given layout
.
When the information is saved, the document pointed by the url will
be opened in the specified type of editor when the layout is
activated.
public abstract void initialize()
Module
initialize
in interface Module
public abstract void addLayoutListener(java.lang.String editorId, BaseLayoutListener listener)
LayoutListener
for one of our child
Editor
instances
editorId
- the id of the editorlistener
- the LayoutListener
instancepublic abstract void removeLayoutListener(java.lang.String editorId)
LayoutListener
for one of our child
Editor
instances
editorId
- the id of the editorpublic abstract ContextMenu getContextMenu()
public final javax.swing.JMenu getMainSubmenu()
public abstract void closeEditors(java.util.List listEditors)
listEditors
- a List of 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 document 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 docClass, java.lang.Class editorClass, java.lang.String preferredLayoutBaseName, PreferredLayoutListener listener)
PreferredLayoutListener
for the specified
docClass
. When an editor belonging to a given
editorClass
opens a document of type docClass
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 final boolean isAutoSyncOn(Editor editor)
public final boolean maySyncEditor(Editor editor)
isAutoSyncOn(oracle.ide.editor.Editor)
public final void addAutoSyncOption(java.lang.String editorClass, java.lang.String editorName, javax.swing.Icon icon, boolean defaultValue)
isAutoSyncOn(oracle.ide.editor.Editor)
public final void addAutoSyncOption(java.lang.String editorClass, java.lang.String editorName, ArrayResourceBundle bundle, int key, boolean defaultValue)
isAutoSyncOn(oracle.ide.editor.Editor)
public final void addAutoSyncOption(java.lang.Class editorClass, java.lang.String editorName, javax.swing.Icon icon, boolean defaultValue)
isAutoSyncOn(oracle.ide.editor.Editor)
public final void disable(Editor editor)
isAutoSyncOn(oracle.ide.editor.Editor)
public abstract boolean isFlatEditor()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.