0

In Eclipse RCP Application UI design of my project will be as below:

PartSashContainer->PartStack->Part1, Part2,Part3.,Part4,Part5
                 |
                 ->PartStack->Part6

Part6 contains the button. If button click in Part6 should set the selection to Part1.

Can you please provide how to achieve the Part selection from different Part.

UI Reference

greg-449
  • 109,219
  • 232
  • 102
  • 145
Priya
  • 15
  • 6

2 Answers2

2

Use the EPartService showPart method:

@Inject
EPartService partService;

...

partService.showPart("part id", PartState.ACTIVATE);
greg-449
  • 109,219
  • 232
  • 102
  • 145
0

Use an injected EPartService where your button is, then pass the Part1's ID to the service to find the part:

final MPart part1 = partService.findPart("part1.id");
part1.setToBeRendered(true);
part1.setVisible(true);

This snippet creates it if it wasn't there. TBH I don't really know if this grants focus or not.

Georgian
  • 8,795
  • 8
  • 46
  • 87