@Override public ListSeparator getSeparatorAbove(ItemWrapper value) { if (value.addSeparatorAbove()) return new ListSeparator(); final List<ItemWrapper> configurations = getValues(); final int index = configurations.indexOf(value); if (index > 0 && index <= configurations.size() - 1) { final ItemWrapper aboveConfiguration = configurations.get(index - 1); if (aboveConfiguration != null && aboveConfiguration.isDynamic() != value.isDynamic()) { return new ListSeparator(); } final ConfigurationType currentType = value.getType(); final ConfigurationType aboveType = aboveConfiguration == null ? null : aboveConfiguration.getType(); if (aboveType != currentType && currentType != null) { return new ListSeparator(); // new ListSeparator(currentType.getDisplayName()); } } return null; }
@Override public ListSeparator getSeparatorAbove(ItemWrapper value) { if (value.addSeparatorAbove()) return new ListSeparator(); final List<ItemWrapper> configurations = getValues(); final int index = configurations.indexOf(value); if (index > 0 && index <= configurations.size() - 1) { final ItemWrapper aboveConfiguration = index == 0 ? null : configurations.get(index - 1); if (aboveConfiguration != null && aboveConfiguration.isDynamic() != value.isDynamic()) { return new ListSeparator(); } final ConfigurationType currentType = value.getType(); final ConfigurationType aboveType = aboveConfiguration == null ? null : aboveConfiguration.getType(); if (aboveType != currentType && currentType != null) { return new ListSeparator(); // new ListSeparator(currentType.getDisplayName()); } } return null; }
private void rebuildLists() { myFilteredList.clear(); mySeparators.clear(); myFullMatchIndex = -1; myStartsWithIndex = -1; ListSeparator lastSeparator = null; for (Object each : myOriginalList) { lastSeparator = ObjectUtils.chooseNotNull(myStep.getSeparatorAbove(each), lastSeparator); if (myFilter.shouldBeShowing(each)) { addToFiltered(each); if (lastSeparator != null) { mySeparators.put(each, lastSeparator); lastSeparator = null; } } } }
public String getCaptionAboveOf(Object value) { ListSeparator separator = getSeparatorAbove(value); if (separator != null) { return separator.getText(); } return ""; }
@Nullable @Override public ListSeparator getSeparatorAbove(Integer value) { return value.equals(ADD_SUBTASK_ID) ? new ListSeparator() : null; }
@Override public ListSeparator getSeparatorAbove(ArtifactPopupItem value) { return myFirst.equals(value.getArtifact()) ? new ListSeparator() : null; }
@Nullable public ListSeparator getSeparatorAbove(T value) { return null; }
private ListSeparator getSeparatorAbove(Object value) { return myStep.getSeparatorAbove(value); }
@Override public ListSeparator getSeparatorAbove(ActionWrapper value) { return value.addSeparatorAbove() ? new ListSeparator() : null; }
@Nullable @Override public ListSeparator getSeparatorAbove(String value) { return MORE.equals(value) ? new ListSeparator() : null; }
@Override @Nullable public ListSeparator getSeparatorAbove(T value) { return null; }
private ListSeparator getSeparatorAbove(Object value) { return mySeparators.get(value); }
@Override public ListSeparator getSeparatorAbove(SmartStepTarget value) { return null; }