コード例 #1
0
  @Override
  public void renderElement(LookupElementPresentation presentation) {
    myClassItem.renderElement(presentation);

    String tailText = StringUtil.notNullize(presentation.getTailText());
    int genericsEnd = tailText.lastIndexOf('>') + 1;

    presentation.clearTail();
    presentation.appendTailText(tailText.substring(0, genericsEnd), false);
    presentation.appendTailText(
        MemberLookupHelper.getMethodParameterString(getObject(), getSubstitutor()), false);
    presentation.appendTailText(tailText.substring(genericsEnd), true);
  }
コード例 #2
0
  public void renderElement(LookupElementPresentation presentation) {

    presentation.setItemText(getLookupString());
    presentation.setTypeText(parameter.getType().toString());

    if (!parameter.getValue().isEmpty())
      presentation.appendTailText("(" + parameter.getValue() + ")", true);

    presentation.setIcon(SilexIcons.Parameter);
  }
コード例 #3
0
 public void setTailText(@Nullable String text, @Nullable Color foreground) {
   clearTail();
   if (text != null) {
     appendTailText(new TextFragment(text, false, foreground));
   }
 }
コード例 #4
0
 public void setTailText(@Nullable String text, boolean grayed) {
   clearTail();
   if (text != null) {
     appendTailText(new TextFragment(text, grayed, null));
   }
 }
コード例 #5
0
 public void appendTailText(@NotNull String text, boolean grayed) {
   appendTailText(new TextFragment(text, grayed, null));
 }