Programmatically showing a View from an Eclipse Plug-in

后端 未结 4 1020

I have a plug-in to an Eclipse RCP application that has a view. After an event occurs in the RCP application, the plug-in is instantiated, its methods are called to populat

4条回答
  •  爱一瞬间的悲伤
    2020-11-29 04:04

    I found the need to bring the view to the front after it had been opened and pushed to the background. The activate method does the trick.

    PlatformUI.getWorkbench()
        .getActiveWorkbenchWindow()
        .getActivePage()
        .activate(workbenchPartToActivate);
    

    NOTE: The workbenchPartToActivate is an instance of IWorkbenchPart.

提交回复
热议问题