public class ArrangementUtil
extends java.lang.Object
public static ArrangementSettings getArrangementSettings(CodeStyleSettings settings, Language language)
public static ArrangementSettings readExternal(Element element, Language language)
public static void writeExternal(Element element, ArrangementSettings settings, Language language)
public static ArrangementMatchCondition combine(ArrangementMatchCondition... nodes)
public static TextRange expandToLineIfPossible(TextRange initialRange, Document document)
class Test { void test() { } int i; }Suppose, we want to locate fields before methods. We can move the exact field and method range then but indent will be broken, i.e. we'll get the result below:
class Test { int i; void test() { } }We can expand field and method range to the whole lines and that would allow to achieve the desired result:
class Test { int i; void test() { } }However, this method is expected to just return given range if there are multiple distinct elements at the same line:
class Test { void test1(){} void test2() {} int i; }
initialRange
- anchor rangedocument
- target document against which the ranges are builtnull
otherwisepublic static ArrangementSettingsToken parseType(ArrangementMatchCondition condition) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static <T> java.util.Set<T> flatten(java.lang.Iterable<? extends java.lang.Iterable<? extends T>> data)
public static java.util.Map<ArrangementSettingsToken,java.lang.Object> extractTokens(ArrangementMatchCondition condition)
public static ArrangementEntryMatcher buildMatcher(ArrangementMatchCondition condition)
public static ArrangementEntryMatcher buildMatcher(ArrangementAtomMatchCondition condition)
public static ArrangementUiComponent buildUiComponent(StdArrangementTokenUiRole role, java.util.List<? extends ArrangementSettingsToken> tokens, ArrangementColorsProvider colorsProvider, ArrangementStandardSettingsManager settingsManager) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static java.util.List<CompositeArrangementSettingsToken> flatten(CompositeArrangementSettingsToken base)
public static java.util.List<StdArrangementMatchRule> collectMatchRules(java.util.List<? extends ArrangementSectionRule> sections)
public static java.util.List<ArrangementSectionRule> getExtendedSectionRules(ArrangementSettings settings)
public static boolean isAliasedCondition(ArrangementAtomMatchCondition condition)