Extension SDK 10.1.3.36.73

oracle.ide.editor
Class EditorAddin

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

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
          return Boolean.FALSE if you do not want to be added to the 'recent files dialog'.
 
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()
          inheritDoc
 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
return Boolean.FALSE if you do not want to be added to the 'recent files dialog'.

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()
inheritDoc


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:

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

Extension SDK 10.1.3.36.73

 

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