org.fife.rsta.ac.xml.XmlLanguageSupport Maven / Gradle / Ivy
/*
* 04/07/2012
*
* Copyright (C) 2012 Robert Futrell
* robert_futrell at users.sourceforge.net
* http://fifesoft.com/rsyntaxtextarea
*
* This library is distributed under a modified BSD license. See the included
* LICENSE.md file for details.
*/
package org.fife.rsta.ac.xml;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.ActionMap;
import javax.swing.InputMap;
import javax.swing.KeyStroke;
import javax.swing.ListCellRenderer;
import org.fife.rsta.ac.AbstractMarkupLanguageSupport;
import org.fife.rsta.ac.GoToMemberAction;
import org.fife.rsta.ac.html.HtmlCellRenderer;
import org.fife.rsta.ac.xml.tree.XmlOutlineTree;
import org.fife.ui.autocomplete.AutoCompletion;
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
//import org.xml.sax.EntityResolver;
//import org.xml.sax.InputSource;
//import org.xml.sax.SAXException;
/**
* Language support for XML. Currently supported features include:
*
*
* - Squiggle underlining of basic XML structure errors.
* - Usage of {@link XmlOutlineTree}, a tree view modeling the XML in
* the
RSyntaxTextArea
.
*
*
* Possible future features include:
*
*
* - DTD/Schema validation.
* - Code completion based off of other tags in the XML.
* - Code completion based off of the relevant DTD or schema.
*
*
* @author Robert Futrell
* @version 1.0
* @see XmlOutlineTree
*/
public class XmlLanguageSupport extends AbstractMarkupLanguageSupport {
/**
* The shared completion provider instance for all XML editors.
*/
private XmlCompletionProvider provider;
/**
* Whether syntax errors are squiggle-underlined in the editor.
*/
private boolean showSyntaxErrors;
/**
* Constructor.
*/
public XmlLanguageSupport() {
setAutoActivationEnabled(true);
setParameterAssistanceEnabled(false);
setShowDescWindow(false);
setShowSyntaxErrors(true);
}
/**
* {@inheritDoc}
*/
@Override
protected ListCellRenderer