To display a view, call getactivepage () in iworkbenchwindow (). the showview method, but we have a problem, that is, when the view is restored in the perspective, it is directly restored to the hover State rather than the placeholder state, after research, the following methods can be used to restore to placeholder:
Iworkbenchpage = activator. getdefault (). getworkbench (). getactiveworkbenchwindow (). getactivepage (); iworkbenchpartreference ref = NULL; iviewreference [] VRS = page. getviewreferences (); For (INT I = 0; I <VRS. length; I ++) {If (VRS [I]. GETID (). equals (viewid) {ref = VRS [I]; break ;}} if (Ref! = NULL) {page. setpartstate (ref, State );}
Description of the state value
Workbenchpage. state_restored: Restores workbenchpage. state_minimized: minimizes workbenchpage. state_maximized: maximized
RCP resume display view (placeholder Mode)