@Override public void initComponent() { super.initComponent(); new PsiTreeChangePreprocessorBase(myPsiManager) { @Override protected boolean isInsideCodeBlock(PsiElement element) { if (element instanceof PsiFileSystemItem) { return false; } if (element == null || element.getParent() == null) return true; final boolean isXml = element.getLanguage() instanceof XMLLanguage; // any xml element isn't inside a "code block" // cause we display even attributes and tag values in structure view return !isXml; } }; }