Search code examples
eclipse-rcpe4

When class gets called part stack should get visible


I am building an application as an Eclipse e4 RCP.

When a command handler class gets called then part stack should be made visible dynamically.

So looking for a code I should use in class to make part stack visible.


Solution

  • If you don't want the MPartStack to show initially turn off the To Be Rendered flag in the part stack design in the Applicatin.e4xmi:

    To Be Rendered flag

    In your command handler you can turn the 'to be rendered' flag on using something like:

    @Execute
    public void execute(MApplication app, EModelService modelService)
    {
      // Find the part stack element
    
      MUIElement partStack = modelService.find("part stack id", app);
    
      // Turn on rendering
    
      partStack.setToBeRendered(true);
    }