@Nullable private XmlElementArrangementEntry createNewEntry(@NotNull TextRange range, @NotNull ArrangementSettingsToken type, @Nullable String name, @Nullable String namespace, boolean canBeMatched) { if (range.getStartOffset() == 0 && range.getEndOffset() == 0 || !isWithinBounds(range)) { return null; } final DefaultArrangementEntry current = getCurrent(); final XmlElementArrangementEntry entry = new XmlElementArrangementEntry( current, range, type, name, namespace, canBeMatched); if (current == null) { myInfo.addEntry(entry); } else { current.addChild(entry); } return entry; }
@Nullable private XmlElementArrangementEntry createNewEntry(@NotNull TextRange range, @NotNull ArrangementSettingsToken type, @Nullable String name, @Nullable String namespace, boolean canBeMatched) { if (!isWithinBounds(range)) { return null; } final DefaultArrangementEntry current = getCurrent(); final XmlElementArrangementEntry entry = new XmlElementArrangementEntry( current, range, type, name, namespace, canBeMatched); if (current == null) { myInfo.addEntry(entry); } else { current.addChild(entry); } return entry; }
@Nullable private XmlElementArrangementEntry createNewEntry(@NotNull TextRange range, @NotNull ArrangementSettingsToken type, @Nullable String name, boolean canBeMatched) { if (!isWithinBounds(range)) { return null; } final DefaultArrangementEntry current = getCurrent(); final XmlElementArrangementEntry entry = new XmlElementArrangementEntry( current, range, type, name, canBeMatched); if (current == null) { myInfo.addEntry(entry); } else { current.addChild(entry); } return entry; }
@Nullable private DefaultArrangementEntry getCurrent() { return myStack.isEmpty() ? null : myStack.peek(); }