Bug 544975 - Open closed project with BACKGROUND_REFRESH causes refresh

When passing IResource.BACKGROUND_REFRESH to IProject.open(int,
IProgressMonitor), the flag is only considered if the project is being
opened for the first time after creation. If the project already existed
but is closed, the BACKGROUND_REFRESH flag does not cause a refresh.

This change adjusts the behaviour, so that passing BACKGROUND_REFRESH to
the open method also affects opening closed projects. This change is
necessary, so that opening closed projects from views (Package Explorer,
Project Explorer, Navigator, etc.) results in a refresh in the
background. E.g. to synchronize a shared project that was updated in its
repository but was closed in the Eclipse workspace.

Change-Id: I80b1593124b337f803a40b8f46dab98cc879e7d4
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
3 files changed