private boolean isElementInsidePlainTextFile( PsiElement element ) { if( element instanceof PsiPlainText ) { element = element.getContainingFile(); } if( element instanceof PsiPlainTextFile ) { PsiElement fakeElement = ResourceToManifoldUtil.findFakePlainTextElement( (PsiPlainTextFile)element ); return fakeElement != null && !(fakeElement instanceof PsiPlainTextFile) && !isTopLevelClassDeclaration( fakeElement ); } return false; }
@Override public boolean canSelect(PsiElement e) { return (e instanceof PsiPlainText || e instanceof PsiComment) && !(e.getContainingFile().getFileType() instanceof CustomSyntaxTableFileType); }
@Override public boolean canSelect(PsiElement e) { return e instanceof PsiPlainText; }
public CurrentBranchCompletionContributor() { extend(CompletionType.BASIC, PlatformPatterns.psiElement(PsiPlainText.class), new Completer()); }
@Override public boolean canSelect(PsiElement e) { return e instanceof PsiPlainText || e instanceof PsiComment; }