本文整理汇总了Java中com.intellij.util.CharTable.intern方法的典型用法代码示例。如果您正苦于以下问题:Java CharTable.intern方法的具体用法?Java CharTable.intern怎么用?Java CharTable.intern使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.CharTable
的用法示例。
在下文中一共展示了CharTable.intern方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createOuterLanguageElement
import com.intellij.util.CharTable; //导入方法依赖的package包/类
protected OuterLanguageElementImpl createOuterLanguageElement(final Lexer lexer, final CharTable table,
@NotNull IElementType outerElementType) {
final CharSequence buffer = lexer.getBufferSequence();
final int tokenStart = lexer.getTokenStart();
if (tokenStart < 0 || tokenStart > buffer.length()) {
LOG.error("Invalid start: " + tokenStart + "; " + lexer);
}
final int tokenEnd = lexer.getTokenEnd();
if (tokenEnd < 0 || tokenEnd > buffer.length()) {
LOG.error("Invalid end: " + tokenEnd + "; " + lexer);
}
return new OuterLanguageElementImpl(outerElementType, table.intern(buffer, tokenStart, tokenEnd));
}
示例2: createOuterLanguageElement
import com.intellij.util.CharTable; //导入方法依赖的package包/类
protected OuterLanguageElementImpl createOuterLanguageElement(final Lexer lexer, final CharTable table,
final IElementType outerElementType) {
final CharSequence buffer = lexer.getBufferSequence();
final int tokenStart = lexer.getTokenStart();
if (tokenStart < 0 || tokenStart > buffer.length()) {
LOG.error("Invalid start: " + tokenStart + "; " + lexer);
}
final int tokenEnd = lexer.getTokenEnd();
if (tokenEnd < 0 || tokenEnd > buffer.length()) {
LOG.error("Invalid end: " + tokenEnd + "; " + lexer);
}
return new OuterLanguageElementImpl(outerElementType, table.intern(buffer, tokenStart, tokenEnd));
}
示例3: internToken
import com.intellij.util.CharTable; //导入方法依赖的package包/类
public static CharSequence internToken(Lexer lexer, CharTable table) {
return table.intern(getTokenText(lexer));
}
示例4: LeafPsiElement
import com.intellij.util.CharTable; //导入方法依赖的package包/类
@Deprecated
public LeafPsiElement(@NotNull IElementType type, CharSequence buffer, int startOffset, int endOffset, CharTable table) {
super(type, table.intern(buffer, startOffset, endOffset));
}
示例5: LeafPsiElement
import com.intellij.util.CharTable; //导入方法依赖的package包/类
@Deprecated
public LeafPsiElement(IElementType type, CharSequence buffer, int startOffset, int endOffset, CharTable table) {
super(type, table.intern(buffer, startOffset, endOffset));
}