svenefftinge/maven-xtext-example — pull request #5 by vorburger (2013-11-23 01:25:49+00:00)
Title: LOW PRIORITY: Better .gitignore

In the past I used to have this problem:

If you git clone a typical Xtext project, e.g. using EGit (or even CLI), then OOB Eclipse Kepler with a fresh workspace has this probably well known problem where it whines about missing src-gen/ & xtend-gen/ ("The project cannot be built until build path errors are resolved"), with red exclamation mark on the project - no quick fix available.

In Xtext this is a particularly bad problem, because you actually cannot launch the *.mwe2 from within the IDE to have it create the src-gen/ & xtend-gen/ for you, because it wasn't (yet) in bin/ (or target/ or whatever its looking at), because it didn't build the project yet due to the red exclamation mark.

It seemed like a good idea to have empty src-gen/ & xtend-gen/ and generated-sources/ empty folders with a .gitignore with */* in source control, to avoid this Eclipse problem.

CURIOUSLY, I WASN'T ABLE TO REPRODUCE THIS CLASSICAL PROBLEM, which I encountered as recently as last week when showing somebody Xtext... I'm unclear about if I'm just too tired ;) to perform the right steps to reproduce, or if something magical in Xtext / Eclipse has meanwhile resolve this problem?!

This technically has nothing to do with Maven of course. I'm just filing this here because... it might be useful to some using this as an example. Maybe it would be useful if as part of https://bugs.eclipse.org/bugs/show_bug.cgi?id=422375 it made it into the standard xtext new project wizard.

Just a thought & suggestion - no offense taken if you don't want to have it like this.