本文整理汇总了Java中com.intellij.spellchecker.inspections.TextSplitter类的典型用法代码示例。如果您正苦于以下问题:Java TextSplitter类的具体用法?Java TextSplitter怎么用?Java TextSplitter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TextSplitter类属于com.intellij.spellchecker.inspections包,在下文中一共展示了TextSplitter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: tokenize
import com.intellij.spellchecker.inspections.TextSplitter; //导入依赖的package包/类
@Override
public void tokenize(@NotNull final XmlAttributeValue element, final TokenConsumer consumer) {
final AndroidResourceReferenceBase reference = findResourceReference(element);
if (reference != null) {
if (reference.getResourceValue().getPackage() == null) {
consumer.consumeToken(element, true, TextSplitter.getInstance());
}
return;
}
// The super implementation already filters out hex color definitions like #001122, but it's limited to RGB colors, not ARGB.
if (isColorString(element.getValue())) {
return;
}
super.tokenize(element, consumer);
}
示例2: tokenize
import com.intellij.spellchecker.inspections.TextSplitter; //导入依赖的package包/类
public void tokenize(@NotNull final XmlAttributeValue element, final TokenConsumer consumer)
{
if(element instanceof PsiLanguageInjectionHost && InjectedLanguageUtil.hasInjections((PsiLanguageInjectionHost) element))
{
return;
}
final String valueTextTrimmed = element.getValue().trim();
// do not inspect colors like #00aaFF
if(valueTextTrimmed.startsWith("#") && valueTextTrimmed.length() <= 7 && isHexString(valueTextTrimmed.substring(1)))
{
return;
}
consumer.consumeToken(element, TextSplitter.getInstance());
}
示例3: tokenize
import com.intellij.spellchecker.inspections.TextSplitter; //导入依赖的package包/类
public void tokenize(@NotNull final XmlAttributeValue element, final TokenConsumer consumer) {
if (element instanceof PsiLanguageInjectionHost && InjectedLanguageUtil.hasInjections((PsiLanguageInjectionHost)element)) return;
final String valueTextTrimmed = element.getValue().trim();
// do not inspect colors like #00aaFF
if (valueTextTrimmed.startsWith("#") && valueTextTrimmed.length() <= 7 && isHexString(valueTextTrimmed.substring(1))) {
return;
}
consumer.consumeToken(element, TextSplitter.getInstance());
}