boolean (PsiPackage aPackage) { PsiElement myContext = getContext(); if (myContext != null) return JavaPsiFacade.getInstance(myContext.getProject()).isInPackage(myContext, aPackage); return aPackage == null || aPackage.getQualifiedName().isEmpty(); }