Search code examples
rcpe4

Switch Image of a Handler in a e4 rcp


I have an e4 rcp application and I want to extend my application with a toolbar item that should change the icon URL when the user execute it.

Is there any possibility to do this as I can do it in a MPart?


Solution

  • Just call the setIconURI method of MToolItem in your handler for the tool item:

    @Execute
    public void execute(MToolItem mitem)
    {
      mitem.setIconURI("platform:/plugin/......");
    
      ... other code
    }