Refresh on closed projects

Hello,

when a project is closed in the eclipse workspace, it is not refreshed by buildship.
When switching between git branches with and without .project files checked in,
projects can not be “recovered” by refreshing. But have to be deleted and reimported.

Why aren’t closed projects updated, even though in current buildship 2 buildship overwrites the .project file?
Or this there another way?

Thanks in advance.

Buildship skips all closed projects upon synchronization. The reason we implemented that way is that most Eclipse APIs the sync logic uses rely on the precondition that the container project is accessible (e.g. not closed). We could reopen the closed projects, execute the synchronization and close it again, but that seems too disturbing from the user POV. After all, there is always a reason why a project gets closed.

If the project is part of a multi-project build then refreshing any other project in that build will also “fix” the one you had closed.

If the project is self-contained then using “Add Gradle Nature” should do the trick.