com.intellij.psi.xml.XmlElement Java Examples

The following examples show how to use com.intellij.psi.xml.XmlElement. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ErrorFilter.java    From intellij-latte with MIT License 6 votes vote down vote up
public boolean shouldHighlightErrorElement(@NotNull PsiErrorElement element) {
	PsiFile templateLanguageFile = PsiUtilCore.getTemplateLanguageFile(element.getContainingFile());
	if (templateLanguageFile == null) {
		return true;
	}
	Language language = templateLanguageFile.getLanguage();
	if (language != LatteLanguage.INSTANCE) {
		return true;
	}
	if (element.getParent() instanceof XmlElement || element.getParent() instanceof CssElement) {
		return false;
	}
	if (element.getParent().getLanguage() == LatteLanguage.INSTANCE) {
		return true;
	}
	PsiElement nextSibling;
	for (nextSibling = PsiTreeUtil.nextLeaf(element); nextSibling instanceof PsiWhiteSpace; nextSibling = nextSibling.getNextSibling());

	PsiElement psiElement = nextSibling == null ? null : PsiTreeUtil.findCommonParent(nextSibling, element);
	boolean nextIsOuterLanguageElement = nextSibling instanceof OuterLanguageElement || nextSibling instanceof LatteMacroClassic;
	return !nextIsOuterLanguageElement || psiElement == null || psiElement instanceof PsiFile;
}
 
Example #2
Source File: ViewHelperArgumentDescriptor.java    From idea-php-typo3-plugin with MIT License 4 votes vote down vote up
@Nullable
@Override
public String validateValue(XmlElement context, String value) {
    return null;
}
 
Example #3
Source File: RTXmlAttributeDescriptor2.java    From react-templates-plugin with MIT License 4 votes vote down vote up
@Override
public String validateValue(XmlElement context, String value) {
    return super.validateValue(context, value);
}
 
Example #4
Source File: RTXmlAttributeDescriptor2.java    From react-templates-plugin with MIT License 4 votes vote down vote up
@Override
public String validateValue(XmlElement context, String value) {
    return super.validateValue(context, value);
}