IDEA-90860 Reformat Code breaks Copyright/Header

1. Block.getSpacing() contract is refined;
2. Java formatter tests don't strip line feeds and trailing spaces now;
3. Test data is corrected;
This commit is contained in:
Denis.Zhdanov
2012-09-01 18:43:06 +04:00
parent a0023648bd
commit 3d15472599
59 changed files with 65 additions and 125 deletions
@@ -1,4 +1,3 @@
class Foo {
void foo() {
foo(
@@ -1,4 +1,3 @@
public class A {
private void foo() {
Runnable a = new Runnable() {
@@ -1,4 +1,3 @@
class Foo {
void foo() {
someVariable = x =
@@ -1,4 +1,3 @@
class Foo {
void foo() {
for (int i = 0;
@@ -1,4 +1,3 @@
class Foo {
public void foo() {
int someVariable = (y +
@@ -1,4 +1,3 @@
class A {
A IMPL = new A() {
void f(boolean b) {
@@ -1,4 +1,3 @@
public class A {
void f() {
new My() {
@@ -1,4 +1,3 @@
class Foo {
void foo() {
assert false;
@@ -1,4 +1,3 @@
class Foo {
void foo() {
if (a) {
@@ -1,4 +1,3 @@
class Foo {
public void a() {
if (b) {
@@ -1,4 +1,3 @@
class Foo {
public void foo() {
if (a) {
@@ -1,4 +1,3 @@
class A {
void foo() {
continue;
@@ -1,4 +1,3 @@
class C {
{
for (String s : collection) {
@@ -1,4 +1,3 @@
class Foo {
void foo() {
if (a) {
@@ -1,4 +1,3 @@
class Foo {
void foo() {
if (a) {
@@ -1,4 +1,3 @@
class Foo {
void foo() {
if (a)
@@ -1,4 +1,3 @@
class Foo {
public void foo() {
bar_call(new Runnable() {
@@ -1,4 +1,3 @@
public class Test {
void anotherMethod(String s);
@@ -1,4 +1,3 @@
class Foo {
void foo() {
ClassBar bar =
@@ -1,4 +1,3 @@
class C {
public static final C1 ourC =
new C2(new C3(),
@@ -1,4 +1,3 @@
class Foo {
void foo() {
try
@@ -1,4 +1,3 @@
class TestFormat {
public void test(boolean isA, boolean isB, boolean isC) {
if (isA)
@@ -1,4 +1,3 @@
class Foo {
void foo() {
if (AAA == BBB ||
@@ -1,4 +1,3 @@
public class Y implements X {
public void doSomething() // this does something
{
@@ -1,4 +1,3 @@
class Foo {
@@ -1,4 +1,3 @@
class A {
{
y = x+++6;
@@ -1,4 +1,3 @@
class Foo {
void foo() {
switch (a) {
@@ -1,4 +1,3 @@
class Foo {
public void foo() {
LOG.bar();
@@ -1,4 +1,3 @@
class Foo {
void foo() {
int someVariable = a ?
@@ -1,4 +1,3 @@
class Foo {
void foo() {
int someVariable = a ?
@@ -1,4 +1,3 @@
class Foo {
public void foo() {
assertEquals(map.get(new File("C:\\PerforceTest1\\created2.txt")), );