IDEA-19061 Integrate the Rearranger-plugin into core-IDEA

1. Arrangement API provides 'dependent entries' concept now;
2. Java static and instance initialization blocks are defined to be 'dependent arrangement entries';
3. Corresponding tests are added;
4. Default java arrangement rules are expanded in order to preserve old 'generated class members order';
5. Test data is corrected;
This commit is contained in:
Denis.Zhdanov
2012-09-06 13:21:41 +04:00
parent 4a4aa01505
commit e76b02dc4e
19 changed files with 300 additions and 31 deletions
@@ -1,9 +1,25 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// "Create Inner Class 'MyCollection'" "true"
public class Test {
public static void main() {
Collection[] cc = new MyCollection[10];
}
<caret>
private static class MyCollection {
}
}
@@ -1,3 +1,19 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// "Create Inner Class 'MyTableModel'" "true"
import javax.swing.*;
import javax.swing.table.TableModel;
@@ -6,7 +22,7 @@ public class Test {
public static void main() {
JTable table = new JTable(new MyTableModel());
}
<caret>
private static class MyTableModel implements TableModel {
}
}
@@ -1,9 +1,25 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// "Create Inner Class 'Generic'" "true"
class Test {
void foo () {
new Generic<String> ();
}
<caret>
private class Generic<T> {
}
}