RCP resume display view (placeholder Mode)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.