mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
IDEA-19061 Integrate the Rearranger-plugin into core-IDEA
1. Simple 'remove condition' operation is supported; 2. Arrangement API is expanded in order to allow to configure mutually excluding settings (e.g. modifiers for java);
This commit is contained in:
+27
@@ -91,4 +91,31 @@ public class ArrangementRuleEditingModelImplTest extends AbstractArrangementRule
|
||||
assertNotNull(modifiersNode);
|
||||
assertEquals(and(atom(PUBLIC), atom(STATIC)), modifiersNode.getUserObject());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void removeAndKeepAllLevels() {
|
||||
configure(and(atom(FIELD), atom(PUBLIC), atom(STATIC)));
|
||||
ArrangementRuleEditingModel model = myRowMappings.get(2);
|
||||
assertNotNull(model);
|
||||
assertEquals(1, myRowMappings.size());
|
||||
|
||||
model.removeAndCondition(atom(PUBLIC));
|
||||
|
||||
assertEquals(1, myRowMappings.size());
|
||||
assertSame(model, myRowMappings.get(2));
|
||||
assertEquals(and(atom(FIELD), atom(STATIC)), model.getSettingsNode());
|
||||
|
||||
DefaultMutableTreeNode fieldNode = (DefaultMutableTreeNode)myRoot.getFirstChild();
|
||||
assertNotNull(fieldNode);
|
||||
assertEquals(atom(FIELD), fieldNode.getUserObject());
|
||||
|
||||
DefaultMutableTreeNode modifiersNode = fieldNode.getFirstLeaf();
|
||||
assertNotNull(modifiersNode);
|
||||
assertEquals(atom(STATIC), modifiersNode.getUserObject());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void removeLastRowCondition() {
|
||||
// TODO den implement
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user