xml
Class XmlActions

java.lang.Object
  extended by xml.XmlActions

public class XmlActions
extends java.lang.Object


Constructor Summary
XmlActions()
           
 
Method Summary
static java.lang.String charactersToEntities(java.lang.String s, java.util.Map hash)
           
static void charactersToEntities(org.gjt.sp.jedit.View view)
           
static void completeClosingTag(org.gjt.sp.jedit.View view, boolean insertSlash)
           
static void copyXPath(org.gjt.sp.jedit.View view)
           
static java.lang.String entitiesToCharacters(java.lang.String s, java.util.Map hash)
           
static void entitiesToCharacters(org.gjt.sp.jedit.View view)
           
static void generateDTD(org.gjt.sp.jedit.View view)
           
static java.lang.String getStandaloneEnd()
           
static void insertClosingTag(org.gjt.sp.jedit.View view)
           
static void insertClosingTagKeyTyped(org.gjt.sp.jedit.View view)
           
static void join(org.gjt.sp.jedit.View view)
          If inside a HTML or XML, join attributes and tagname all on one line.
static void matchTag(org.gjt.sp.jedit.textarea.JEditTextArea textArea)
           
static void openSchema(org.gjt.sp.jedit.View view)
           
static void removeTags(org.gjt.sp.jedit.Buffer buffer)
           
static void selectBetweenTags(org.gjt.sp.jedit.textarea.JEditTextArea textArea)
          Selects content of an element, can be called repeatedly
static void selectElement(org.gjt.sp.jedit.textarea.JEditTextArea textArea)
          Selects whole element, can be called repeatedly to select parent element of selected element.
static TagParser.Tag selectTag(org.gjt.sp.jedit.textarea.JEditTextArea textArea)
          Selects tag at caret.
static void showEditTagDialog(org.gjt.sp.jedit.View view)
           
static void showEditTagDialog(org.gjt.sp.jedit.View view, java.lang.String elementName, ElementDecl elementDecl, org.gjt.sp.jedit.textarea.Selection insideTag, NamespaceBindings namespaces, NamespaceBindings namespacesToInsert, boolean reallyShowEditTagDialog)
          show EditTagDialog in order to insert open and close tags or edit current tag
static void split(org.gjt.sp.jedit.View view)
          If inside a tag, calls splitTagAtCaret.
static void splitTag(TagParser.Tag tag, org.gjt.sp.jedit.textarea.JEditTextArea textArea, java.lang.CharSequence text)
          Splits tag at caret, so that attributes are on separate lines.
static void xmlMatchTag(org.gjt.sp.jedit.textarea.JEditTextArea textArea)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlActions

public XmlActions()
Method Detail

showEditTagDialog

public static void showEditTagDialog(org.gjt.sp.jedit.View view)

showEditTagDialog

public static void showEditTagDialog(org.gjt.sp.jedit.View view,
                                     java.lang.String elementName,
                                     ElementDecl elementDecl,
                                     org.gjt.sp.jedit.textarea.Selection insideTag,
                                     NamespaceBindings namespaces,
                                     NamespaceBindings namespacesToInsert,
                                     boolean reallyShowEditTagDialog)
show EditTagDialog in order to insert open and close tags or edit current tag

Parameters:
view - current view
elementName - qualified element name to insert
elementDecl - element to insert (may not be null)
insideTag - Selection of the current start tag (or part of, for instance inf XmlCompletion, what has been already typed)
namespaces - namespace bindings in scope for current location (not those declared inside the start tag itself)
namespacesToInsert - namespace bindings that will have to be inserted at the end of the start tag
reallyShowEditTagDialog - false to disable showing the dialog at all, but insert the start and end tags nonetheless

insertClosingTag

public static void insertClosingTag(org.gjt.sp.jedit.View view)

splitTag

public static void splitTag(TagParser.Tag tag,
                            org.gjt.sp.jedit.textarea.JEditTextArea textArea,
                            java.lang.CharSequence text)
Splits tag at caret, so that attributes are on separate lines.


join

public static void join(org.gjt.sp.jedit.View view)
If inside a HTML or XML, join attributes and tagname all on one line. Otherwise do nothing.


split

public static void split(org.gjt.sp.jedit.View view)
If inside a tag, calls splitTagAtCaret. If the DTD allows this tag to be split, split at the cursor. Note that this can be used to do a kind of 'fast-editing', eg when editing an HTML <p> this will insert an end tag (if necessary) and then place the cursor inside a new <p>. TODO: Syntax Checking


removeTags

public static void removeTags(org.gjt.sp.jedit.Buffer buffer)

matchTag

public static void matchTag(org.gjt.sp.jedit.textarea.JEditTextArea textArea)

xmlMatchTag

public static void xmlMatchTag(org.gjt.sp.jedit.textarea.JEditTextArea textArea)

selectElement

public static void selectElement(org.gjt.sp.jedit.textarea.JEditTextArea textArea)
Selects whole element, can be called repeatedly to select parent element of selected element. If no element found, calls "Select Code Block" action -- analogy to the "Select Matching Tag or Bracket" action


selectTag

public static TagParser.Tag selectTag(org.gjt.sp.jedit.textarea.JEditTextArea textArea)
Selects tag at caret. Also returns it. Returns null if there is no tag.


selectBetweenTags

public static void selectBetweenTags(org.gjt.sp.jedit.textarea.JEditTextArea textArea)
Selects content of an element, can be called repeatedly


insertClosingTagKeyTyped

public static void insertClosingTagKeyTyped(org.gjt.sp.jedit.View view)

completeClosingTag

public static void completeClosingTag(org.gjt.sp.jedit.View view,
                                      boolean insertSlash)

charactersToEntities

public static java.lang.String charactersToEntities(java.lang.String s,
                                                    java.util.Map hash)

charactersToEntities

public static void charactersToEntities(org.gjt.sp.jedit.View view)

entitiesToCharacters

public static java.lang.String entitiesToCharacters(java.lang.String s,
                                                    java.util.Map hash)

entitiesToCharacters

public static void entitiesToCharacters(org.gjt.sp.jedit.View view)

getStandaloneEnd

public static java.lang.String getStandaloneEnd()

generateDTD

public static void generateDTD(org.gjt.sp.jedit.View view)

openSchema

public static void openSchema(org.gjt.sp.jedit.View view)

copyXPath

public static void copyXPath(org.gjt.sp.jedit.View view)