mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-79486 Java formatter: Correct processing of anonymous classes as method call arguments
This commit is contained in:
+25
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2010 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -358,10 +358,10 @@ public class JavaFormatterIndentationTest extends AbstractJavaFormatterTest {
|
||||
"}\n" +
|
||||
"});",
|
||||
"foo(new Runnable() {\n" +
|
||||
" @Override\n" +
|
||||
" public void run() {\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" @Override\n" +
|
||||
" public void run() {\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" new Runnable() {\n" +
|
||||
" @Override\n" +
|
||||
" public void run() {\n" +
|
||||
@@ -435,6 +435,26 @@ public class JavaFormatterIndentationTest extends AbstractJavaFormatterTest {
|
||||
"}, 1, 2);"
|
||||
);
|
||||
}
|
||||
|
||||
public void testAnonymousClassesOnSameLineAtMethodCallExpression() throws Exception {
|
||||
doMethodTest(
|
||||
"foo(new Runnable() {\n" +
|
||||
" public void run() {\n" +
|
||||
" }\n" +
|
||||
" }, new Runnable() {\n" +
|
||||
" public void run() {\n" +
|
||||
" }\n" +
|
||||
" });",
|
||||
"foo(new Runnable() {\n" +
|
||||
" public void run() {\n" +
|
||||
" }\n" +
|
||||
" }, new Runnable() {\n" +
|
||||
" public void run() {\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
");"
|
||||
);
|
||||
}
|
||||
|
||||
public void testPackagePrivateAnnotation() {
|
||||
// Inspired by IDEA-67294
|
||||
|
||||
Reference in New Issue
Block a user