use of com.perl5.lang.perl.parser.Class.Accessor.psi.stubs.PerlClassAccessorWrapperStub in project Perl5-IDEA by Camelcade.
the class PerlClassAccessorWrapper method isFollowBestPractice.
public boolean isFollowBestPractice() {
PerlPolyNamedElementStub stub = getStub();
if (stub != null) {
return ((PerlClassAccessorWrapperStub) stub).isFollowBestPractice();
}
PerlClassAccessorWrapperStub greenStub = getGreenStub();
if (greenStub != null) {
return greenStub.isFollowBestPractice();
}
boolean[] result = new boolean[] { false };
// fixme we need a smarter treewalkup here, scopes are not necessary here
PerlResolveUtil.treeWalkUp(this, (element, state) -> {
if (element instanceof PsiPerlNamespaceContent) {
return false;
}
if (PsiUtilCore.getElementType(element) == CLASS_ACCESSOR_FBP) {
result[0] = true;
return false;
}
return true;
});
return result[0];
}
Aggregations