Icon is not coming in Context Actions tool palette though we have set it

  • I have assigned an icon for Routine Definition

  • I have created a context action for removing the "routine definition", when the cursor is placed on the routine definition.
  • In the "icon section" of the action in transformation menu, i returned node.getSideIcon()  (When i printed it to the console, i came to know that this is always null).

  • So the icon is not coming in context actions palette.
  • How to get the icon in the context actions palette?



0
2 comments

I got some workaround for this. We can use IconResourceUtil.getIconResourceForNode(node); to get the IconResource of the corresponding node. :) 

But can i know why node.getSideIcon() does not provide the node's icon?

1

Also there are other options for specifying icon/icon resource . We have to import the language "jetbrains.mps.lang.resources" for using them.

0

Please sign in to leave a comment.