@Nullable @Override public Pair<XmlElementArrangementEntry, List<XmlElementArrangementEntry>> parseWithNew(@NotNull PsiElement root, @Nullable Document document, @NotNull Collection<TextRange> ranges, @NotNull PsiElement element, @Nullable ArrangementSettings settings) { final XmlArrangementParseInfo newEntryInfo = new XmlArrangementParseInfo(); element.accept(new XmlArrangementVisitor(newEntryInfo, Collections.singleton(element.getTextRange()))); if (newEntryInfo.getEntries().size() != 1) { return null; } final XmlElementArrangementEntry entry = newEntryInfo.getEntries().get(0); final XmlArrangementParseInfo existingEntriesInfo = new XmlArrangementParseInfo(); root.accept(new XmlArrangementVisitor(existingEntriesInfo, ranges)); return Pair.create(entry, existingEntriesInfo.getEntries()); }
@Nullable @Override public Pair<XmlElementArrangementEntry, List<XmlElementArrangementEntry>> parseWithNew( @NotNull PsiElement root, @Nullable Document document, @NotNull Collection<TextRange> ranges, @NotNull PsiElement element, @NotNull ArrangementSettings settings) { final XmlArrangementParseInfo newEntryInfo = new XmlArrangementParseInfo(); element.accept(new XmlArrangementVisitor(newEntryInfo, Collections.singleton(element.getTextRange()))); if(newEntryInfo.getEntries().size() != 1) { return null; } final XmlElementArrangementEntry entry = newEntryInfo.getEntries().get(0); final XmlArrangementParseInfo existingEntriesInfo = new XmlArrangementParseInfo(); root.accept(new XmlArrangementVisitor(existingEntriesInfo, ranges)); return Pair.create(entry, existingEntriesInfo.getEntries()); }
@NotNull @Override public List<XmlElementArrangementEntry> parse(@NotNull PsiElement root, @Nullable Document document, @NotNull Collection<TextRange> ranges, @Nullable ArrangementSettings settings) { final XmlArrangementParseInfo parseInfo = new XmlArrangementParseInfo(); root.accept(new XmlArrangementVisitor(parseInfo, ranges)); return parseInfo.getEntries(); }
@Nullable @Override public Pair parseWithNew(@NotNull PsiElement element, @Nullable Document document, @NotNull Collection collection, @NotNull PsiElement element2, @Nullable ArrangementSettings settings) { return null; }
@NotNull @Override public List parse(@NotNull PsiElement element, @Nullable Document document, @NotNull Collection collection, @Nullable ArrangementSettings settings) { return null; }
@NotNull @Override public List<XmlElementArrangementEntry> parse( @NotNull PsiElement root, @Nullable Document document, @NotNull Collection<TextRange> ranges, @NotNull ArrangementSettings settings) { final XmlArrangementParseInfo parseInfo = new XmlArrangementParseInfo(); root.accept(new XmlArrangementVisitor(parseInfo, ranges)); return parseInfo.getEntries(); }
@Nullable public ArrangementSettings getArrangementSettings() { return myArrangementSettings; }
public void setArrangementSettings(@NotNull ArrangementSettings settings) { myArrangementSettings = settings; }
@NotNull @Override public ArrangementSettings clone() { return new StdArrangementSettings(cloneGroupings(), cloneSectionRules()); }
public void setArrangementSettings(@Nonnull ArrangementSettings settings) { myArrangementSettings = settings; }
@Nonnull @Override public ArrangementSettings clone() { return new StdArrangementSettings(cloneGroupings(), cloneSectionRules()); }