Java 类com.intellij.openapi.ui.popup.ListSeparator 实例源码

项目:intellij-ce-playground    文件:ChooseRunConfigurationPopup.java   
@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;
}
项目:tools-idea    文件:ChooseRunConfigurationPopup.java   
@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;
}
项目:consulo    文件:ListPopupModel.java   
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;
      }
    }
  }
}
项目:consulo    文件:ChooseRunConfigurationPopup.java   
@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;
}
项目:intellij-ce-playground    文件:ListPopupModel.java   
public String getCaptionAboveOf(Object value) {
  ListSeparator separator = getSeparatorAbove(value);
  if (separator != null) {
    return separator.getText();
  }
  return "";
}
项目:tools-idea    文件:ListPopupModel.java   
public String getCaptionAboveOf(Object value) {
  ListSeparator separator = getSeparatorAbove(value);
  if (separator != null) {
    return separator.getText();
  }
  return "";
}
项目:consulo    文件:ListPopupModel.java   
public String getCaptionAboveOf(Object value) {
  ListSeparator separator = getSeparatorAbove(value);
  if (separator != null) {
    return separator.getText();
  }
  return "";
}
项目:educational-plugin    文件:CCSubtaskEditorNotificationProvider.java   
@Nullable
@Override
public ListSeparator getSeparatorAbove(Integer value) {
  return value.equals(ADD_SUBTASK_ID) ? new ListSeparator() : null;
}
项目:intellij-ce-playground    文件:BuildArtifactAction.java   
@Override
public ListSeparator getSeparatorAbove(ArtifactPopupItem value) {
  return myFirst.equals(value.getArtifact()) ? new ListSeparator() : null;
}
项目:intellij-ce-playground    文件:BaseListPopupStep.java   
@Nullable
public ListSeparator getSeparatorAbove(T value) {
  return null;
}
项目:intellij-ce-playground    文件:ListPopupModel.java   
private ListSeparator getSeparatorAbove(Object value) {
  return myStep.getSeparatorAbove(value);
}
项目:intellij-ce-playground    文件:ChooseRunConfigurationPopup.java   
@Override
public ListSeparator getSeparatorAbove(ActionWrapper value) {
  return value.addSeparatorAbove() ? new ListSeparator() : null;
}
项目:intellij-ce-playground    文件:PythonSdkDetailsStep.java   
@Nullable
@Override
public ListSeparator getSeparatorAbove(String value) {
  return MORE.equals(value) ? new ListSeparator() : null;
}
项目:tools-idea    文件:BuildArtifactAction.java   
@Override
public ListSeparator getSeparatorAbove(ArtifactPopupItem value) {
  return myFirst.equals(value.getArtifact()) ? new ListSeparator() : null;
}
项目:tools-idea    文件:BaseListPopupStep.java   
@Nullable
public ListSeparator getSeparatorAbove(T value) {
  return null;
}
项目:tools-idea    文件:ListPopupModel.java   
private ListSeparator getSeparatorAbove(Object value) {
  return myStep.getSeparatorAbove(value);
}
项目:tools-idea    文件:ChooseRunConfigurationPopup.java   
@Override
public ListSeparator getSeparatorAbove(ActionWrapper value) {
  return value.addSeparatorAbove() ? new ListSeparator() : null;
}
项目:consulo    文件:BaseListPopupStep.java   
@Override
@Nullable
public ListSeparator getSeparatorAbove(T value) {
  return null;
}
项目:consulo    文件:ListPopupModel.java   
private ListSeparator getSeparatorAbove(Object value) {
  return mySeparators.get(value);
}
项目:consulo    文件:ChooseRunConfigurationPopup.java   
@Override
public ListSeparator getSeparatorAbove(ActionWrapper value) {
  return value.addSeparatorAbove() ? new ListSeparator() : null;
}
项目:consulo    文件:BuildArtifactAction.java   
@Override
public ListSeparator getSeparatorAbove(ArtifactPopupItem value) {
  return myFirst.equals(value.getArtifact()) ? new ListSeparator() : null;
}
项目:consulo-java    文件:PsiMethodListPopupStep.java   
@Override
public ListSeparator getSeparatorAbove(SmartStepTarget value)
{
    return null;
}