-1

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.

greg-449
  • 109,219
  • 232
  • 102
  • 145
user123
  • 79
  • 1
  • 7
  • You need to provide a lot more detail here. Is this an e4 RCP with an MPartStack declared in the Application.e4xmi or a 3.x compatibility mode RCP? – greg-449 Jan 18 '17 at 07:17
  • Also what does 'when a class get called' mean? Are you talking about a command handler? – greg-449 Jan 18 '17 at 07:42
  • e4 RCP I am talking about. I am talking about Handler class, when it gets called part stack should get visible. – user123 Jan 18 '17 at 10:03

1 Answers1

0

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);
}
greg-449
  • 109,219
  • 232
  • 102
  • 145
  • What is not working? I tested this and it works fine for me, you need to be much more explicit about the problem. Is the handler running? Is it finding the part stack? – greg-449 Jan 18 '17 at 11:53
  • Sorry!! Due to different error it was not working. Its working fine now. Thank you!! – user123 Jan 18 '17 at 12:59