src/com/millennialmedia/intellibot/ide/RobotCompletionContributor.java
//                    .withPresentableText(prompt): the text displayed in popup window
.withPresentableText(prompt): the text displayed in popup window
. withPresentableText ( prompt ) : the text displayed in popup window
private static void addVariablesToResult(@NotNull final Collection<DefinedVariable> variables,
                                             @NotNull final CompletionResultSet result,
                                             @Nullable PsiElement position) {
        for (DefinedVariable variable : variables) {
            if (!variable.isInScope(position)) {
                continue;
            }
            String text = variable.getLookup();
            if (text != null) {
                String[] words = text.split("\\s+");
                String lookupString = words.length > 0 ? words[0] : text;
                LookupElement element = TailTypeDecorator.withTail(
                        LookupElementBuilder.create(lookupString)
                                .withLookupString(text)
                                .withPresentableText(lookupString)
                                .withCaseSensitivity(false),
                        TailType.NONE);
                result.addElement(element);
            }
        }
    }
private static void addVariablesToResult ( @ NotNull final Collection < DefinedVariable > variables , @ NotNull final CompletionResultSet result , @ Nullable PsiElement position ) { for ( DefinedVariable variable : variables ) { if ( ! variable . isInScope ( position ) ) { continue ; } String text = variable . getLookup ( ) ; if ( text != null ) { String [ ] words = text . split ( "\\s+" ) ; String lookupString = words . length > 0 ? words [ 0 ] : text ; LookupElement element = TailTypeDecorator . withTail ( LookupElementBuilder . create ( lookupString ) . withLookupString ( text ) . withPresentableText ( lookupString ) . withCaseSensitivity ( false ) , TailType . NONE ) ; result . addElement ( element ) ; } } }
.withPresentableText(prompt): the text displayed in popup window
. withPresentableText ( prompt ) : the text displayed in popup window
// we only want the first word of the variable