|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aptana.ide.editor.html.parsing.HTMLUtils
public final class HTMLUtils
| Field Summary | |
|---|---|
static int |
TAG_CLOSED
is the tag "closed" |
static int |
TAG_OPEN
is the tag "open" |
static int |
TAG_SELF_CLOSED
is the tag "self-closed" |
| Method Summary | |
|---|---|
static java.lang.String |
createCloseTag(Lexeme tag,
boolean close)
Creates a close tag for the tag name |
static java.lang.String |
createCloseTag(Lexeme tag,
int offset,
boolean close)
Creates a close tag for the tag name, but trimmed such that we only create the close tag from the part _before_ the offset (assuming the offset is inside the lexeme) |
static java.lang.String |
createCloseTag(java.lang.String tagName,
boolean close)
Creates a close tag for the tag name |
static java.lang.String |
createOpenTag(java.lang.String tagName,
boolean close)
Creates a open tag for the tag name |
static java.lang.String |
createSelfClosedTag(java.lang.String tagName)
Creates a open tag for the tag name taht self-closes |
static java.util.Hashtable |
gatherAttributes(Lexeme openTagLexeme,
Lexeme closeTagLexeme,
LexemeList lexemeList)
Given an opening and a closing lexeme of an HTML open tag declaration it will grab all of the attributes inside as a hashtable |
static Lexeme |
getFirstLexemeWithText(java.lang.String lexemeText,
LexemeList lexemeList)
getFirstLexemeWithText |
static Lexeme[] |
getLexemesOfType(int[] lexemeTypes,
LexemeList lexemeList,
java.lang.String language)
getLexemesOfType |
static Lexeme[] |
getLexemesOfType(int lexemeTypes,
LexemeList lexemeList,
java.lang.String language)
getLexemesOfType |
static Lexeme |
getNextLexemeOfType(Lexeme startLexeme,
int[] lexemeTypes,
int[] lexemeTypesToBail,
LexemeList lexemeList)
getNextLexemeOfType |
static Lexeme |
getNextLexemeOfType(Lexeme startLexeme,
int[] lexemeTypes,
LexemeList lexemeList)
getNextLexemeOfType |
static java.lang.String |
getOpenTagName(Lexeme tag,
int offset)
Gets the open name of the tag in question, but trimmed such that we only create the name from the part _before_ the offset (assuming the offset is inside the lexeme) |
static Lexeme |
getPreviousUnclosedTag(Lexeme lexeme,
LexemeList lexemeList,
HTMLParseState parseState)
getPreviousUnclosedTag |
static Lexeme |
getTagCloseLexeme(int offset,
LexemeList lexemeList)
getTagCloseLexeme |
static Lexeme |
getTagCloseLexeme(Lexeme startLexeme,
LexemeList lexemeList)
getTagCloseLexeme |
static Lexeme |
getTagOpenLexeme(int offset,
LexemeList lexemeList)
getTagOpenLexeme |
static Lexeme |
getTagOpenLexeme(Lexeme lexeme,
LexemeList lexemeList)
getTagOpenLexeme |
static boolean |
insertEquals(org.eclipse.jface.preference.IPreferenceStore store)
Do we insert an equals sign? |
static boolean |
insideOpenTag(int offset,
LexemeList lexemeList)
Returns true if we are somewhere inside the opening tag definition i.e. |
static boolean |
insideQuotedString(Lexeme lexeme,
int offset)
Are we inside a lexeme where it is "quoted" |
static boolean |
isEndTag(Lexeme lexeme)
isEndTag |
static boolean |
isEqualSignAlreadyInserted(int offset,
LexemeList ll)
We don't insert a = if there is already one there |
static boolean |
isStartTag(Lexeme lexeme)
isStartTag |
static boolean |
isTagBalanced(Lexeme tag,
LexemeList lexemeList,
HTMLParseState parseState)
Is the current tag "balanced" by a later closing tag? |
static int |
isTagClosed(Lexeme tag,
LexemeList lexemeList)
Is the current tag "closed", i.e. |
static boolean |
isTextQuoted(java.lang.String text)
Is the text surrounded with " or ' |
static boolean |
isTextQuoted(java.lang.String text,
java.lang.String quote)
Is the text surrounded with " or ' |
static java.lang.String |
quoteAttributeValue(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String value)
Surrounds the item with quotes according to the current preferences |
static java.lang.String |
stripTagEndings(java.lang.String tag)
Removes the "<" and "" from the beginning and end of a tag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TAG_OPEN
public static final int TAG_CLOSED
public static final int TAG_SELF_CLOSED
| Method Detail |
|---|
public static java.lang.String stripTagEndings(java.lang.String tag)
tag - The tag text to strip
public static java.lang.String createOpenTag(java.lang.String tagName,
boolean close)
tagName - The name of the tagclose -
public static java.lang.String createSelfClosedTag(java.lang.String tagName)
tagName - The name of the tag
public static java.lang.String createCloseTag(Lexeme tag,
boolean close)
tag - The opening lexemeclose -
public static java.lang.String createCloseTag(java.lang.String tagName,
boolean close)
tagName - The name of the tagclose -
public static java.lang.String createCloseTag(Lexeme tag,
int offset,
boolean close)
tag - The name of the tagoffset - close -
public static java.lang.String getOpenTagName(Lexeme tag,
int offset)
tag - The name of the tagoffset -
public static boolean isEqualSignAlreadyInserted(int offset,
LexemeList ll)
offset - ll -
public static boolean isTextQuoted(java.lang.String text)
text - The string text
public static boolean isTextQuoted(java.lang.String text,
java.lang.String quote)
text - The string textquote - The character we are comparing for quotes
public static int isTagClosed(Lexeme tag,
LexemeList lexemeList)
tag - lexemeList -
public static boolean isTagBalanced(Lexeme tag,
LexemeList lexemeList,
HTMLParseState parseState)
tag - lexemeList - parseState -
public static Lexeme getPreviousUnclosedTag(Lexeme lexeme,
LexemeList lexemeList,
HTMLParseState parseState)
lexeme - lexemeList - parseState -
public static Lexeme getTagOpenLexeme(int offset,
LexemeList lexemeList)
offset - lexemeList -
public static Lexeme getTagOpenLexeme(Lexeme lexeme,
LexemeList lexemeList)
lexeme - lexemeList -
public static boolean insideQuotedString(Lexeme lexeme,
int offset)
lexeme - The string textoffset - The current cursor offset
public static boolean insideOpenTag(int offset,
LexemeList lexemeList)
offset - lexemeList -
public static boolean isStartTag(Lexeme lexeme)
lexeme -
public static boolean isEndTag(Lexeme lexeme)
lexeme -
public static Lexeme getFirstLexemeWithText(java.lang.String lexemeText,
LexemeList lexemeList)
lexemeText - lexemeList -
public static Lexeme[] getLexemesOfType(int lexemeTypes,
LexemeList lexemeList,
java.lang.String language)
lexemeTypes - lexemeList - language -
public static Lexeme[] getLexemesOfType(int[] lexemeTypes,
LexemeList lexemeList,
java.lang.String language)
lexemeTypes - lexemeList - language -
public static Lexeme getTagCloseLexeme(int offset,
LexemeList lexemeList)
offset - lexemeList -
public static Lexeme getTagCloseLexeme(Lexeme startLexeme,
LexemeList lexemeList)
startLexeme - lexemeList -
public static Lexeme getNextLexemeOfType(Lexeme startLexeme,
int[] lexemeTypes,
LexemeList lexemeList)
startLexeme - lexemeTypes - lexemeList -
public static Lexeme getNextLexemeOfType(Lexeme startLexeme,
int[] lexemeTypes,
int[] lexemeTypesToBail,
LexemeList lexemeList)
startLexeme - lexemeTypes - lexemeTypesToBail - lexemeList -
public static java.util.Hashtable gatherAttributes(Lexeme openTagLexeme,
Lexeme closeTagLexeme,
LexemeList lexemeList)
openTagLexeme - closeTagLexeme - lexemeList -
public static java.lang.String quoteAttributeValue(org.eclipse.jface.preference.IPreferenceStore store,
java.lang.String value)
store - value -
public static boolean insertEquals(org.eclipse.jface.preference.IPreferenceStore store)
store -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||