|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jdeveloper.java.editing.AbstractEditingPlugin
public abstract class AbstractEditingPlugin
The AbstractEditingPlugin
is an assistance plugin that helps with Java/JavaScript coding (basically, languages with descendants from C), to take care of the various tedious aspects of editing, such as lining up asterisks in multi-line comments, balancing comment start and ends, and so on.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_ALIGN_CLOSE_BRACE The name of the property where we store whether align close braces is enabled or not. |
static java.lang.String |
PROPERTY_AUTO_ASTERISK The name of the property where we store whether auto asterisks is enabled or not. |
static java.lang.String |
PROPERTY_AUTO_BRACE_END The name of the property where we store whether auto brace end is enabled or not. |
static java.lang.String |
PROPERTY_AUTO_COMMENT_END The name of the property where we store whether auto comment end is enabled or not. |
static java.lang.String |
PROPERTY_AUTO_GEN_DOC_COMMENTS The name of the property that stores whether auto generate doc comments is enabled or not. |
static java.lang.String |
PROPERTY_AUTO_PAREN_END The name of the property where we store whether auto paren (or bracket) end is enabled or not. |
static java.lang.String |
PROPERTY_AUTO_QUOTE_END The name of the property where we store whether auto quote end is enabled or not. |
static java.lang.String |
PROPERTY_AUTO_QUOTE_EXTEND The name of the property where we store whether auto quote extension (when inserting a new line) is enabled or not. |
static java.lang.String |
PROPERTY_AUTO_SPLIT_SINGLE_LINE_COMMENT The name of the property where we store whether auto comment end is enabled or not. |
static java.lang.String |
PROPERTY_MOVE_OPEN_BRACE The name of the property where we store whether we should move the open brace to match the open brace style when the user enters a new open brace. |
static java.lang.String |
PROPERTY_OPEN_BRACE_SAME_LINE The name of the property for whether the open brace should be kept on the same line. |
Constructor Summary | |
---|---|
AbstractEditingPlugin() Constructs a new AbstractEditingPlugin that is not currently associated with any editor or document. |
Method Summary | |
---|---|
protected abstract void |
addJavadocCommentsAtOffset() Creates comments including stub Javadoc stubs as necessary. |
void |
caretUpdate(javax.swing.event.CaretEvent event) Called when the caret position is updated. |
void |
characterTyped(BasicEditorPane editorPane, int offset, char typedChar) Providers notification that a character was typed by the user and inserted into the editor pane. |
protected void |
clearLastTypedChars() Utility routine to clear our queue of last typed chars. |
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. |
protected char |
getAutoQuoteExtendChar(LexerToken lexerToken) Get the quote character to be used for auto-extending a quoted string. |
protected BraceProvider |
getBraceProvider() Get the brace provider to be used for the various operations. |
protected BasicDocument |
getDocument() Utility routine to fetch the document being edited. |
protected LexerDocumentRenderer |
getDocumentRenderer() Get the document renderer to be used for the various operations. |
protected BasicEditorPane |
getEditorPane() |
protected abstract AbstractLexer |
getLexer() Get the lexer. |
protected abstract int |
getRightBracketToken() Get the right bracket token. |
protected abstract int |
getRightParenToken() Get the right parenthesis token. |
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 |
invokedAction(java.lang.String actionKey) Notifies the listener that the given action, denoted by the key, was just invoked and completed successfully. |
protected boolean |
isAutoQuoteExtendEnabled() Private utility routine to check whether auto quote extend is currently enabled. |
protected abstract boolean |
isCharacterLiteralToken(int token) Check if the given token is a character literal token. |
protected abstract boolean |
isEofToken(int token) Check if the given token is an End-of-file (EOF) token. |
protected abstract boolean |
isMultiLineOrDocCommentToken(int token) Check if the given token is a multi line comment or a doc comment token. |
protected abstract boolean |
isSingleLineCommentToken(int token) Check if the given token is a single line comment token. |
protected abstract boolean |
isStringLiteralToken(int token) Check if the given token is a string literal token. |
protected boolean |
isStringQuoteChar(char c) Check if the given character represents a quote character used for string literals. |
void |
propertyChange(java.beans.PropertyChangeEvent event) This method gets called when a bound property is changed. |
protected abstract boolean |
skipCloseParenGeneration(int token) Check if a close parenthesis needs to be generated, if an open parenthesis is followed by the given token. |
protected void |
updateLastTypedChars(int offset, char c) Utility routine to help maintain our queue of most recently typed (consecutive) characters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_AUTO_ASTERISK
public static final java.lang.String PROPERTY_AUTO_COMMENT_END
public static final java.lang.String PROPERTY_AUTO_SPLIT_SINGLE_LINE_COMMENT
public static final java.lang.String PROPERTY_AUTO_GEN_DOC_COMMENTS
public static final java.lang.String PROPERTY_AUTO_BRACE_END
public static final java.lang.String PROPERTY_OPEN_BRACE_SAME_LINE
public static final java.lang.String PROPERTY_MOVE_OPEN_BRACE
public static final java.lang.String PROPERTY_ALIGN_CLOSE_BRACE
public static final java.lang.String PROPERTY_AUTO_QUOTE_END
public static final java.lang.String PROPERTY_AUTO_QUOTE_EXTEND
public static final java.lang.String PROPERTY_AUTO_PAREN_END
Constructor Detail |
---|
public AbstractEditingPlugin()
AbstractEditingPlugin
that is not currently associated with any editor or document.Method Detail |
---|
protected BasicEditorPane getEditorPane()
protected abstract AbstractLexer getLexer()
protected abstract boolean isEofToken(int token)
token
- The tokenprotected abstract boolean isSingleLineCommentToken(int token)
token
- The tokenprotected abstract boolean isMultiLineOrDocCommentToken(int token)
token
- The tokenprotected abstract boolean isCharacterLiteralToken(int token)
token
- The tokenprotected abstract boolean isStringLiteralToken(int token)
token
- The tokenprotected abstract int getRightParenToken()
protected abstract int getRightBracketToken()
protected abstract boolean skipCloseParenGeneration(int token)
token
- The tokenprotected abstract void addJavadocCommentsAtOffset()
protected void clearLastTypedChars()
protected void updateLastTypedChars(int offset, char c)
offset
- the offset where the char was typedc
- new character typedprotected BasicDocument getDocument()
protected BraceProvider getBraceProvider()
protected LexerDocumentRenderer getDocumentRenderer()
protected char getAutoQuoteExtendChar(LexerToken lexerToken)
lexerToken
- The current lexer tokenprotected boolean isStringQuoteChar(char c)
c
- The character to checkprotected boolean isAutoQuoteExtendEnabled()
public void install(BasicEditorPane editor)
install
in interface EditorPlugin
editor
- the editor panepublic void deinstall(BasicEditorPane editor)
deinstall
in interface EditorPlugin
editor
- the editor panepublic 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 boolean invokeAction(java.lang.String actionKey)
invokeAction
in interface ActionHookInvoker
actionKey
- the published key for the actionpublic void invokedAction(java.lang.String actionKey)
invokedAction
in interface ActionPostInvoker
actionKey
- the published key for the actionpublic void caretUpdate(javax.swing.event.CaretEvent event)
caretUpdate
in interface javax.swing.event.CaretListener
event
- the caret eventpublic void characterTyped(BasicEditorPane editorPane, int offset, char typedChar)
characterTyped
in interface CharacterTypedListener
editorPane
- the editor pane where the character was typedoffset
- the offset where the character was insertedtypedChar
- the character that was typed
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |