diff --git a/platform/lang-api/src/com/intellij/codeInsight/lookup/LookupElementBuilder.java b/platform/lang-api/src/com/intellij/codeInsight/lookup/LookupElementBuilder.java index 9b980c50198c..189e6581d171 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/lookup/LookupElementBuilder.java +++ b/platform/lang-api/src/com/intellij/codeInsight/lookup/LookupElementBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -210,9 +210,14 @@ public final class LookupElementBuilder extends LookupElement { public LookupElementBuilder setTypeText(@Nullable String typeText, boolean grayed) { return withTypeText(typeText, grayed); } + public LookupElementBuilder withTypeText(@Nullable String typeText, boolean grayed) { + return withTypeText(typeText, null, grayed); + } + + public LookupElementBuilder withTypeText(@Nullable String typeText, @Nullable Icon typeIcon, boolean grayed) { final LookupElementPresentation presentation = copyPresentation(); - presentation.setTypeText(typeText); + presentation.setTypeText(typeText, typeIcon); presentation.setTypeGrayed(grayed); return new LookupElementBuilder(myLookupString, myObject, myInsertHandler, null, presentation, myAllLookupStrings, myCaseSensitive);