Icon for lookup item

I create completion items with icons:


but the LookupValueFactory.createLookupValue(label, icon) needs icon that has size 32 x 16 pixels and really consists from two icons with size 16 x 16 pixels (for example, method and public icons). Can I pass two icons to some LookupValueFactory method, or use some utility method to compose 32 x 16 icon? How do standard completions get these icons?

4 comments
Comment actions Permalink

Take a look at this one: com.intellij.ui.RowIcon

0
Comment actions Permalink

Thanks you for your answer! I investigated this class and now use this code to create public method icon:


I have a RowIcon related question. How to produce an empty icon that has size 16 x 16. The possible way:


Does exist simpler way to produce empty icon (like Icons.METHOD constant), or can I specify that some icon in the RowIcon is empty?

0
Comment actions Permalink

A LayeredIcon is a special icon capable of drawing several icons one on top of the other. Most probably that's not what you want. You should do something like this instead:

0

Please sign in to leave a comment.