@@ -120,21 +120,25 @@ public Component getListCellRendererComponent(JList list, Object value,
120
120
//
121
121
// } else
122
122
if (value instanceof ShorthandCompletion ) {
123
- text = ((ShorthandCompletion ) value ).getShortDescription ();
123
+ ShorthandCompletion v = (ShorthandCompletion ) value ;
124
+ text = v .getShortDescription ();
124
125
tokenType = CompletionType .TEMPLATE ;
125
126
} 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 );
128
130
tokenType = CompletionType .FUNCTION ;
129
131
} 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 ();
133
137
}
134
138
} 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 );
138
142
}
139
143
140
144
if (text == null ) {
0 commit comments