Skip to content

Instantly share code, notes, and snippets.

@vexus2
Created November 21, 2013 04:32
Show Gist options
  • Save vexus2/7576143 to your computer and use it in GitHub Desktop.
Save vexus2/7576143 to your computer and use it in GitHub Desktop.
completion contributor
@Override
public void fillCompletionVariants(CompletionParameters parameters, CompletionResultSet result) {
String arr$[] = new String[] {"foo", "bar"};
int len$ = arr$.length;
for (int i$ = 0; i$ < len$; i$++) {
String s = arr$[i$];
result.addElement(createDocTagLookup(false, s));
}
super.fillCompletionVariants(parameters, result);
}
private LookupElementBuilder createDocTagLookup(boolean at, String s)
{
return LookupElementBuilder.create(at ? s.substring(1) : s).withBoldness(true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment