mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
create constructor matching super: insert braces when no present (IDEA-77194)
This commit is contained in:
+4
@@ -112,6 +112,10 @@ public class CreateConstructorMatchingSuperFix extends BaseIntentionAction {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (targetClass.getLBrace() == null) {
|
||||
PsiClass psiClass = JavaPsiFacade.getInstance(targetClass.getProject()).getElementFactory().createClass("X");
|
||||
targetClass.addRangeAfter(psiClass.getLBrace(), psiClass.getRBrace(), targetClass.getLastChild());
|
||||
}
|
||||
PsiElementFactory factory = JavaPsiFacade.getInstance(project).getElementFactory();
|
||||
CodeStyleManager reformatter = CodeStyleManager.getInstance(project);
|
||||
PsiMethod derived = null;
|
||||
|
||||
Reference in New Issue
Block a user