Package org.fife.rsta.ac
Class AbstractMarkupLanguageSupport.InsertClosingTagAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- javax.swing.text.TextAction
-
- org.fife.rsta.ac.AbstractMarkupLanguageSupport.InsertClosingTagAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
- Enclosing class:
- AbstractMarkupLanguageSupport
private class AbstractMarkupLanguageSupport.InsertClosingTagAction extends javax.swing.text.TextActionAction that checks whether a closing tag should be auto-inserted into the document. Subclasses should map this action to the '>' key-typed event.
-
-
Constructor Summary
Constructors Constructor Description InsertClosingTagAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)private java.lang.StringdiscoverTagName(org.fife.ui.rsyntaxtextarea.RSyntaxDocument doc, int dot)Discovers the name of the tag just opened, if any.-
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
-
discoverTagName
private java.lang.String discoverTagName(org.fife.ui.rsyntaxtextarea.RSyntaxDocument doc, int dot)Discovers the name of the tag just opened, if any. Assumes standard SGML-style markup tags.- Parameters:
doc- The document to parse.dot- The location of the caret. This should be right at a ">" character closing an HTML tag.- Returns:
- The name of the tag to close, or
nullif it could not be determined.
-
-