Eclipse showing .svn-base files in "Open Resource" dialog…

Posted by Dan on Apr 20, 2009 @ 10:46 AM

Recently after installing a fresh copy of Eclipse 3.4 on my PC, I ran into an issue with the "Open Resouce" dialog ([CTRL]+[SHIFT]+[R]) where it was showing all my SVN files. Installing Subclipse is supposed to make the Eclipse IDE automatically hide the .svn-base files from showing up (via the "Team" interface) but it wasn't working out for me.

Turns out there was a very easy solution to this problem—just right click on the project and choose "Close Project" from the menu. After the project closes, just right-click on the project and select "Open Project." This should reinitialize all the settings on a project and appears to registered the handling of automatically hiding the .svn-base files.

An alternative, would be to add the find your org.eclipse.ui.ide_3.4.*.jar (org.eclipse.ui.ide_3.4.2.M20090127-1700.jar) and then modify the plugin.xml file to include the filter "*.svn-base". I don't like this option because it requires you to change a JAR that could later be updated.

If you choose that route, close Eclipse and open the JAR with a Zip extraction tool. Next, search the plugin.xml for the text "<filter". There should be one filter tag:

<filter
     selected="false"
     pattern=".*">

</filter>

Now right after that line XML element, add the line:

<code>

<filter
      selected="false"
      pattern="*.svn-base">
</filter>

Save the file and add it back to your JAR. Now restart Eclipse.

Now when you click on the triangle and choose filter:

image

You'll now see the *.svn-base as an option to hide:

 

image

You'll only want to do this as a last ditch effort as your SVN plug-in should handle hiding these resources automatically.

However, I've always wondered why the "Navigation Filters" dialog doesn't allow you to add new filters right from the dialog.

Categories: HTML/ColdFusion, Java

7 Comments

  • Tried it, but didnt seem to work for me.

    I've got PDT Eclipse running as the main perspective though.

    Didnt work on resource perspective either =(
  • Sadly this does not work with MyEclipse.
  • @twing - You have to install Subclipse plugin and then close and reopen yours projects
  • Try the following:
    Project > Properties > Resource > Resource Filters > Add
    Exclude All
    Folders
    All Children (recursive)
    Name Matches: .svn
    OK and Apply
  • Solution provided by Ari worked nicely. It needs to be repeated for every project, though.
  • Ari's method (see below) works for me.
    Mine is _svn, instead of .svn, for .NET project legacy reason.
    I wonder the SVN plug-in in Eclipse should have supported this natively, instead of requiring user intervention.
    Plus, according to Shasi, this intervention needs to be done for every single new project.


    Ari's method
    Try the following:
    Project > Properties > Resource > Resource Filters > Add
    Exclude All
    Folders
    All Children (recursive)
    Name Matches: .svn
    OK and Apply
  • I had older .svn folder that were hidden and newer ones that weren't. Closing and re-opening project worked all by itself. THANKS!

Comments for this entry have been disabled.