Working set from .gitignore in Eclipse

100 Views Asked by At

How do I have a Project Explorer's Working Set be built automatically from the contents of .gitignore, and then kept in sync with .gitignore?

I am working on a C++ AutoTools project which, as it is common for AutoTools projects, generates quite a lot of files during the build stage. I do have them .gitignored already. Now I'm trying Eclipse on that project, and found that I'd have to carefully pick files to ignore again.

1

There are 1 best solutions below

0
On

You cannot. This feature does not exist.


The working sets functionality was implemented a long time before GIT appeared, and it was a method for removing clutter in large projects, and what is important, it was was a method that resided in the UI domain.

In fact, A working set extension point documentation shows it is possible to create a self-updating working set, and the search over the egit codebase returns no results.

As I have said, this feature is not implemented.

However, you can create your own plugin that will do what you want. It is not very complicated, and should not take more than a day or two. Or just open a feature request in the Eclipse bugzilla.


As for your underlying problem, you could try using the derived resources mechanism. It was added to make possible to prevent team providers (CVS/GIT) from managing files that are a result of a build.

Just a word of warning - GIT won't allow you to ignore further changes to any resource already under its control.