How to add filter to navigator in eclipse

Source: Internet
Author: User

In eclipse, navigator has a filter. You can select some filters to display the files to be viewed.

However, there are no configurable options.

Google a record on the Internet.

 

Eclipse Galileo (3.5.2) I am using ).

What I want to do is to add Filtering for. SVN and makefile. *.

 

Open the plugins folder under the installation directory and find the jar package:

Org. Eclipse. UI. Navigator. resources_3.4.1.M20090826-0800.jar

After opening the file with WinZip, edit the two files.

1. Plugin. Properties

Add the following lines:

Filters. SVN. Name =. SVN Resources
Filters. SVN. Description = hides resources that name ". SVN"
Filters. makefile. Name = makefile. * Resources
Filters. makefile. Description = hides resources that begin with "makefile"

These are to be used later

 

2. Plugin. xml

Find several filters that are already included in the commonfilter tag. Follow these steps. Use the strings defined above.

The content I added is

<Commonfilter
Id = "org. Eclipse. UI. Navigator. Resources. Filters. SVN"
Name = "% filters. SVN. Name"
Description = "% filters. SVN. Description"
Activebydefault = "true"
>
<Filterexpression>
<And>
<Adapt type = "org. Eclipse. Core. Resources. iresource">
<Test property = "org. Eclipse. Core. Resources. Name" value = ". SVN"/>
</Adapt>
</And>
</Filterexpression>
</Commonfilter>
<Commonfilter
Id = "org. Eclipse. UI. Navigator. Resources. Filters. makefile"
Name = "% filters. makefile. Name"
Description = "% filters. makefile. Description"
Activebydefault = "true"
>
<Filterexpression>
<And>
<Adapt type = "org. Eclipse. Core. Resources. iresource">
<Test property = "org. Eclipse. Core. Resources. Name" value = "makefile. *"/>
</Adapt>
</And>
</Filterexpression>
</Commonfilter>

 

Then restart .... Not effective .... Restart the instance, but it does not take effect .... After restarting the instance, Run "check for update" (under the Help menu ).... It's so slow. Wait for a while and it stops... Restart the instance and it will take effect!

It's strange, but it works.

 

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.