Bug 573595 - AutoBuildJob following a search and replace might run as
system job

Don't schedule "real" autobuild job if autobuild is off. Instead,
schedule a "dummy" system job that only sends PRE_BUILD/POST_BUILD
events to follow the contract defined by IResourceChangeEvent.

With that, there is no need to set the "system" state for the real
autobuild job to hide it.

This prevents all kinds of build job state inconsistencies shown in the
Progress view - if the autobuild is disabled, "real" autobuild job is
simply not running (only system job that sends events), if autobuild is
enabled, "real" autobuild job is always shown in the Progress view.

Change-Id: If0a37d9d1a0fd7fe0ff54a416e087edb9755d13c
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/181719
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Reviewed-by: Andrey Loskutov <loskutov@gmx.de>
2 files changed