org.fife.rsta.ac.html.HtmlLanguageSupport Maven / Gradle / Ivy
/*
* 03/21/2010
*
* Copyright (C) 2010 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.html;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
import javax.swing.ListCellRenderer;
import org.fife.rsta.ac.AbstractMarkupLanguageSupport;
import org.fife.ui.autocomplete.AutoCompletion;
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
/**
* Language support for HTML. This currently provides the following:
*
*
* - Code completion for HTML5 tags and attributes.
* - Automatic creation of closing tags for non-self-closing tags.
*
*
* @author Robert Futrell
* @version 1.0
*/
public class HtmlLanguageSupport extends AbstractMarkupLanguageSupport {
/**
* The completion provider. This is shared amongst all HTML text areas.
*/
private HtmlCompletionProvider provider;
/**
* A cached set of tags that require closing tags.
*/
private static Set tagsToClose;
/**
* Constructor.
*/
public HtmlLanguageSupport() {
setAutoActivationEnabled(true);
setParameterAssistanceEnabled(false);
setShowDescWindow(true);
}
/**
* {@inheritDoc}
*/
@Override
protected ListCellRenderer