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

E13403-05

oracle.jdeveloper.merge
Class AbstractMergeAddin

java.lang.Object
  extended by oracle.ide.editor.EditorAddin
      extended by oracle.jdeveloper.merge.AbstractMergeAddin
All Implemented Interfaces:
Addin

public abstract class AbstractMergeAddin
extends EditorAddin

Abstract class for a dynamically registered merge editor addin.

Since:
10.1.3.0.3

Field Summary
 
Fields inherited from class oracle.ide.editor.EditorAddin
ATTRIBUTE_NO_RECENT_FILE, ATTRIBUTE_RESTORABLE
 
Constructor Summary
AbstractMergeAddin(java.lang.Class editorClass)
          Constructor.
 
Method Summary
 void closeEditors()
          Closes all merge editors of the type represented by this addin.
 java.lang.Class getEditorClass()
          Gets the merge editor class associated with this merge addin.
 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.
 MenuSpec getMenuSpecification()
          Gets the menu specification of this Addin.
 boolean isDefault()
          
 boolean isDuplicable()
          An EditorAddin should return true if its editor allows duplication.
 boolean isEditorAvailable(Context context)
          Asks whether the merge editor should be made available for the given context.
protected  boolean isEditorAvailable(Element element)
          Asks whether the editor should be made available for the given Element.
protected  boolean isEditorAvailable(java.net.URL url)
          Asks whether the editor should be made available for the given URL.
 boolean restoreAtStartup()
          Determines if the document must be reloaded at startup.
 
Methods inherited from class oracle.ide.editor.EditorAddin
getAttribute, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMergeAddin

public AbstractMergeAddin(java.lang.Class editorClass)
Constructor.

Parameters:
editorClass - the merge editor class
Method Detail

getEditorClass

public java.lang.Class getEditorClass()
Gets the merge editor class associated with this merge addin.

Specified by:
getEditorClass in class EditorAddin
Returns:
the addin's merge editor class.

isEditorAvailable

public boolean isEditorAvailable(Context context)
Asks whether the merge editor should be made available for the given context. By default, delegates to isEditorAvailable(Element) with the element of the context.

Parameters:
context - a given context.
Returns:
true if the merge editor should be made availabe.

closeEditors

public void closeEditors()
Closes all merge editors of the type represented by this addin.


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'

Overrides:
getEditorWeight in class EditorAddin
Parameters:
element -
Returns:
A float value that indicates where to position the editor tab.

isDefault

public boolean isDefault()

Overrides:
isDefault in class EditorAddin
Returns:
true if your editor was statically registered and you want it to be the default editor.

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.

Overrides:
isDuplicable in class EditorAddin
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.

Overrides:
restoreAtStartup in class EditorAddin
Returns:

getMenuSpecification

public 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.

Specified by:
getMenuSpecification in class EditorAddin
Returns:
a menu specification.

isEditorAvailable

protected boolean isEditorAvailable(Element element)
Asks whether the editor should be made available for the given Element. By default, we delegate to isEditorAvailable(URL).

Parameters:
element - the element.
Returns:
true is the editor should be made available.

isEditorAvailable

protected boolean isEditorAvailable(java.net.URL url)
Asks whether the editor should be made available for the given URL. By default, returns false.

Parameters:
url - the URL.
Returns:
true is the editor should be made available.

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

E13403-05

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