|
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.javatools.editor.plugins.BraceMatchingPlugin
public final class BraceMatchingPlugin
The BraceMatchingPlugin
provides support for brace matching in languages where the LanguageSupport provides an implementation of the BraceProvider interface for getting information about braces specific to a language. It will highlight a pair of matching braces when the caret is on either side of either brace. If the caret sits between two non-matching braces, the plugin will highlight both pairs in different styles. If a brace has no matching partner, it will be highlighted in a third (non-matching) style. To use this plugin, install it into the editor pane by calling
on the installPlugin()
BasicEditorPane
. Make sure you have implementations of the BraceProvider interface for languages you want brace matching in.
Field Summary | |
---|---|
static int |
DEFAULT_BRACE_PRIORITY The default priority level given to the highlight for brace matching results. |
static java.lang.String |
HIGHLIGHT_BRACE_MATCH1 The name of the highlight for the first matched brace pair. |
static java.lang.String |
HIGHLIGHT_BRACE_MATCH2 The name of the highlight for the second matched brace pair. |
static java.lang.String |
HIGHLIGHT_BRACE_MISMATCH The name of the highlight for the brace mismatch. |
static java.lang.String |
HIGHLIGHT_ENCLOSING_BLOCK The name of the highlight for the enclosing block. |
static java.lang.String |
HIGHLIGHT_ENCLOSING_PARENS The name of the highlight for the enclosing parens. |
Constructor Summary | |
---|---|
BraceMatchingPlugin() |
Method Summary | |
---|---|
void |
caretUpdate(javax.swing.event.CaretEvent event) Called when the caret position is updated. |
void |
changedUpdate(javax.swing.event.DocumentEvent event) Gives notification that an attribute or set of attributes changed. |
void |
deinstall(BasicEditorPane editor) Called when the plugin is being removed from the BasicEditorPane (for example when the editor is closed.) This is used to notify plugins that they should unregister any listeners that were attached. |
void |
insertUpdate(javax.swing.event.DocumentEvent event) Gives notification that there was an insert into the document. |
void |
install(BasicEditorPane editor) Called when this plugin is being installed into the BasicEditorPane. |
boolean |
invokeAction(java.lang.String actionKey) Invokes the Action corresponding to the given actionKey. |
void |
propertyChange(java.beans.PropertyChangeEvent event) This method gets called when a bound property is changed. |
void |
removeUpdate(javax.swing.event.DocumentEvent event) Gives notification that a portion of the document has been removed. |
static void |
shutdown() Shut down the brace matching plugin. |
protected void |
updateEnabled() Utility routine to check whether brace matching should be enabled or not. |
protected void |
updateTimerDelay() Private utility routine to update the delay used for brace matching. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BRACE_PRIORITY
public static final java.lang.String HIGHLIGHT_BRACE_MATCH1
public static final java.lang.String HIGHLIGHT_BRACE_MATCH2
public static final java.lang.String HIGHLIGHT_BRACE_MISMATCH
public static final java.lang.String HIGHLIGHT_ENCLOSING_BLOCK
public static final java.lang.String HIGHLIGHT_ENCLOSING_PARENS
Constructor Detail |
---|
public BraceMatchingPlugin()
Method Detail |
---|
public static void shutdown()
public void install(BasicEditorPane editor)
install
in interface EditorPlugin
editor
- the editor panepublic void deinstall(BasicEditorPane editor)
deinstall
in interface EditorPlugin
editor
- the editor paneprotected void updateEnabled()
protected void updateTimerDelay()
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
event
- A PropertyChangeEvent object describing the event source and the property that has changed.public void caretUpdate(javax.swing.event.CaretEvent event)
caretUpdate
in interface javax.swing.event.CaretListener
event
- the caret eventpublic void insertUpdate(javax.swing.event.DocumentEvent event)
insertUpdate
in interface javax.swing.event.DocumentListener
event
- the document eventpublic void removeUpdate(javax.swing.event.DocumentEvent event)
removeUpdate
in interface javax.swing.event.DocumentListener
event
- the document eventpublic void changedUpdate(javax.swing.event.DocumentEvent event)
changedUpdate
in interface javax.swing.event.DocumentListener
event
- the document eventpublic boolean invokeAction(java.lang.String actionKey)
invokeAction
in interface ActionHookInvoker
actionKey
- the published key for the action
|
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 |