Eclipse RCP development: Custom Navigation view CNF (3) Add hidden file functionality for Navigation view

Source: Internet
Author: User

Org.eclipse.ui.navigator.navigatorContent Right-click New Commonfilter

ID: Unique

Name: Names such as: *.xml resources

Description: Description, such as: Hides *.xml resources

In the property download Add property: Where value is a wildcard XML

 <filterexpression>            <and >               <adapt                       type= "Org.eclipse.core.resources.IResource" >                   <test                         property = "Org.eclipse.core.resources.name"                          value= "*.xml" >                   </test>                </adapt>             </and>         </ Filterexpression>

Add Contentextension in includes under the Com.itec.rcp.navigatorContent property

After the configuration is complete, launching the Navigation view does not load the project we created.

Need to register in Applicationworkbenchadvisor.java

Add two methods at the bottom:

/** * CNF needs to be used */@Overridepublic iadaptable getdefaultpageinput () {return resourcesplugin.getworkspace (). Getroot ();} /** * CNF needs to be used */@Overridepublic void Initialize (Iworkbenchconfigurer configurer) {ide.registeradapters ();}

This launch opportunity shows the project that was created.

Complete all of the above steps, open the view, create a new XML, does not appear, select the hidden XML in the customer view has been selected, if unchecked, the XML file will be displayed

Source Address: Http://pan.baidu.com/s/1sjHeoNj

Reprint Trouble plus link, thank you for your cooperation.

Related Article

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.