mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
skip ignoring whitespaces when choosing the anchor (IDEA-93459)
This commit is contained in:
@@ -38,6 +38,7 @@ import com.intellij.psi.codeStyle.arrangement.MemberOrderService;
|
||||
import com.intellij.psi.impl.compiled.ClsClassImpl;
|
||||
import com.intellij.psi.impl.source.codeStyle.ImportHelper;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -184,7 +185,7 @@ public class JavaPsiImplementationHelperImpl extends JavaPsiImplementationHelper
|
||||
MemberOrderService service = ServiceManager.getService(MemberOrderService.class);
|
||||
PsiElement anchor = service.getAnchor(member, settings.getCommonSettings(JavaLanguage.INSTANCE), aClass);
|
||||
|
||||
if (anchor != null && anchor.getNextSibling() == aClass.getRBrace()) {
|
||||
if (anchor != null && PsiTreeUtil.skipSiblingsForward(anchor, PsiWhiteSpace.class) == aClass.getRBrace()) {
|
||||
// Given member should be inserted as the last child.
|
||||
return aClass.getRBrace();
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Create Constructor" "true"
|
||||
public enum ReportType {
|
||||
AGING("Aging");
|
||||
|
||||
ReportType(String aging) {
|
||||
<selection>//To change body of created methods use File | Settings | File Templates.</selection>
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Create Constructor" "true"
|
||||
public enum ReportType {
|
||||
AGING("Aging")<caret>
|
||||
}
|
||||
Reference in New Issue
Block a user