}
@Override
public void inlineElement(Project project, Editor editor, PsiElement psiElement) {
BnfRule rule = (BnfRule)psiElement;
BnfAttrs attrs = rule.getAttrs();
if (PsiTreeUtil.hasErrorElements(rule)) {
CommonRefactoringUtil.showErrorHint(project, editor, "Rule has errors", "Inline Rule", null);
return;
}
if (attrs != null && !attrs.getAttrList().isEmpty()) {
CommonRefactoringUtil.showErrorHint(project, editor, "Rule has attributes", "Inline Rule", null);
return;
}
Collection<PsiReference> allReferences = ReferencesSearch.search(psiElement).findAll();