@@ -120,21 +120,25 @@ public Component getListCellRendererComponent(JList list, Object value,
120120 //
121121 // } else
122122 if (value instanceof ShorthandCompletion ) {
123- text = ((ShorthandCompletion ) value ).getShortDescription ();
123+ ShorthandCompletion v = (ShorthandCompletion ) value ;
124+ text = v .getShortDescription ();
124125 tokenType = CompletionType .TEMPLATE ;
125126 } else if (value instanceof FunctionCompletion ) {
126- text = font (((FunctionCompletion ) value ).getInputText (), LIGHT_BLUE )
127- + font (((FunctionCompletion ) value ).getShortDescription (), GRAY );
127+ FunctionCompletion v = (FunctionCompletion ) value ;
128+ text = font (v .getInputText (), LIGHT_BLUE ) + " "
129+ + font (v .getShortDescription (), GRAY );
128130 tokenType = CompletionType .FUNCTION ;
129131 } else if (value instanceof BasicCompletion ) {
130- text = ((BasicCompletion ) value ).getInputText ();
131- if (((BasicCompletion ) value ).getShortDescription () != null ) {
132- text = ((BasicCompletion ) value ).getShortDescription ();
132+ BasicCompletion v = (BasicCompletion ) value ;
133+ if (v .getShortDescription () != null ) {
134+ text = v .getShortDescription ();
135+ } else {
136+ text = v .getInputText ();
133137 }
134138 } else if (value instanceof TemplateCompletion ) {
135- TemplateCompletion template = (TemplateCompletion ) value ;
136- text = font (template .getInputText (), LIGHT_BLUE )
137- + font (template .getDefinitionString (), GRAY );
139+ TemplateCompletion v = (TemplateCompletion ) value ;
140+ text = font (v .getInputText (), LIGHT_BLUE ) + " "
141+ + font (v .getDefinitionString (), GRAY );
138142 }
139143
140144 if (text == null ) {
0 commit comments