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,7 +1,21 @@
/*
* 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.
*/
public class X {
A myField;
private final Base myDelegate = new Base();
A myField;
public void method(Test t) {
myField = t.getA();
myField.methodFromA();
@@ -1,6 +1,21 @@
/*
* 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.
*/
class A {
int fieldFromA;
private final MyBase myDelegate = new MyBase();
int fieldFromA;
public void firstMethodFromBase() {
myDelegate.firstMethodFromBase();