Search code examples
eclipseswteclipse-rcprcpe4

Change the Part selection in RCP Application when Button click in different Part


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


Solution

  • Use the EPartService showPart method:

    @Inject
    EPartService partService;
    
    ...
    
    partService.showPart("part id", PartState.ACTIVATE);