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

E13403-08

oracle.ide.editor
Class EditorAddin

java.lang.Object
  extended by oracle.ide.editor.EditorAddin
All Implemented Interfaces:
Addin
Direct Known Subclasses:
AbstractMergeAddin, CodeEditorAddin, FlatEditorAddin, VersionHistoryAddin

public abstract class EditorAddin
extends java.lang.Object
implements Addin

This class is used to declare an Editor with the EditorManager.


Field Summary
static java.lang.String ATTRIBUTE_NO_RECENT_FILE
          Deprecated. since 11.1.1. Use ATTRIBUTE_RESTORABLE.
static java.lang.String ATTRIBUTE_RESTORABLE
          return Boolean.FALSE if your editor is not restorable from its URL.
 
Constructor Summary
EditorAddin()
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.Object key)
           
abstract  java.lang.Class getEditorClass()
          Gets the fully qualified class name of the Editor being registered.
 float getEditorWeight(Element element)
          This method is called by the EditorManager when a FlatEditorAddin is registered with EditorManager.registerDynamic(EditorAddin) and a new file is opened.
abstract  MenuSpec getMenuSpecification()
          Gets the menu specification of this Addin.
 void initialize()
          Invoked by the AddinManager after the instance of the Addin is instantiated.
 boolean isDefault()
           
 boolean isDuplicable()
          An EditorAddin should return true if its editor allows duplication.
 boolean restoreAtStartup()
          Determines if the document must be reloaded at startup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_NO_RECENT_FILE

public static final java.lang.String ATTRIBUTE_NO_RECENT_FILE
Deprecated. since 11.1.1. Use ATTRIBUTE_RESTORABLE.
return Boolean.FALSE if you do not want to be added to the 'recent files dialog'.

See Also:
Constant Field Values

ATTRIBUTE_RESTORABLE

public static final java.lang.String ATTRIBUTE_RESTORABLE
return Boolean.FALSE if your editor is not restorable from its URL. By default editors on ide protocol URL documents are not restorable. For other protocols, you can use this property.

This property will prevent the editor from participating in recent file lists and navigation that reopens closed files.

An EditorAddin which doesn't provide a value for this property is assumed to return Boolean.TRUE.

Since:
11.1.1
See Also:
Constant Field Values
Constructor Detail

EditorAddin

public EditorAddin()
Method Detail

getEditorClass

public abstract java.lang.Class getEditorClass()
Gets the fully qualified class name of the Editor being registered.

Returns:
the Editor's class name

isDefault

public boolean isDefault()
Returns:
true if your editor was statically registered and you want it to be the default editor.

getMenuSpecification

public abstract MenuSpec getMenuSpecification()
Gets the menu specification of this Addin. This specification may be used to add a menu item to the main menu bar and/or to any context menu popped up in a NavigatorWindow.

Returns:
a menu specification.

getEditorWeight

public float getEditorWeight(Element element)
This method is called by the EditorManager when a FlatEditorAddin is registered with EditorManager.registerDynamic(EditorAddin) and a new file is opened.

The returned value is used to determine if an editor tab should be added and where it should be added.

The meaning of 'secondary' has not been clearly defined yet but it could mean that those editors would be available from a continuation button at the right of the editor tabs. In case you forgot, a float value ends with a 'F', like '0.5F'

Parameters:
element -
Returns:
A float value that indicates where to position the editor tab.

isDuplicable

public boolean isDuplicable()
An EditorAddin should return true if its editor allows duplication. It basically means that if the user splits the editor window, the editor will be shown in both windows. If the editor does not allow duplication, the default editor will be shown if the second window. If the default editor does not allow duplication either, the duplicable editor will be chosen.

Returns:
true if the editor can be duplicated.

restoreAtStartup

public boolean restoreAtStartup()
Determines if the document must be reloaded at startup. If any of the editors open on that document returns Boolean.FALSE, the document will not be restored when the user restarts the application.


getAttribute

public java.lang.Object getAttribute(java.lang.Object key)
Parameters:
key - one of the ATTRIBUTE_ constants.
Returns:
the value corresponding to the ATTRIBUTE_ constant.

initialize

public void initialize()
Description copied from interface: Addin
Invoked by the AddinManager 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.

Specified by:
initialize in interface Addin
See Also:
AddinManager

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

E13403-08

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