by robert » Fri May 28, 2010 11:24 pm
The setSummary() method doesn't return anything, so you cannot do it the way you are. There is, however, a constructor that also takes the summary text as a fourth argument. Try this instead:
- Code: Select all
provider.addCompletion(new BasicCompletion(provider, "background", "some short description", "<html>This is the summary text"));
Alternatively, you can do this:
- Code: Select all
Basiccompletion bc = new BasicCompletion(provider, "background", "some short description");
bc.setSummary("<html>This is the summary text");
provider.addCompletion(bc);
Note also that Swing is nice, and you don't have to type the closing "</html>" tag. It won't hurt anything if you do, but if you don't, it'll still render the same.
The setSummary() method doesn't return anything, so you cannot do it the way you are. There is, however, a constructor that also takes the summary text as a fourth argument. Try this instead:
[code]
provider.addCompletion(new BasicCompletion(provider, "background", "some short description", "<html>This is the summary text"));
[/code]
Alternatively, you can do this:
[code]
Basiccompletion bc = new BasicCompletion(provider, "background", "some short description");
bc.setSummary("<html>This is the summary text");
provider.addCompletion(bc);
[/code]
Note also that Swing is nice, and you don't have to type the closing "</html>" tag. It won't hurt anything if you do, but if you don't, it'll still render the same.