use of com.perl5.lang.perl.psi.mixins.PerlStatementMixin in project Perl5-IDEA by Camelcade.
the class PerlConvertableCompound method isConvertableToModifier.
/**
* @return true if compound may be converted to the statement modifier
*/
default boolean isConvertableToModifier() {
PsiPerlBlock mainBlock = getBlock();
if (mainBlock == null) {
return false;
}
PsiElement[] children = mainBlock.getChildren();
return children.length == 1 && children[0] instanceof PerlStatementMixin && ((PerlStatementMixin) children[0]).getModifier() == null;
}
Aggregations