Don't run ResourceRefreshJob as Workspace job to avoid resource events
commit76ab31f44a34a3f61f649bf61a3b114f590a2954
authorAndrey Loskutov <loskutov@gmx.de>
Fri, 28 Aug 2015 15:33:48 +0000 (28 17:33 +0200)
committerAndrey Loskutov <loskutov@gmx.de>
Tue, 1 Sep 2015 08:51:19 +0000 (1 04:51 -0400)
treef0fcc98f2939969d044fb55df061472f7cb57d8f
parent99cdec0cd3cce94f4ceb69364c715dfa81ee0edb
Don't run ResourceRefreshJob as Workspace job to avoid resource events

ResourceRefreshJob is triggered each time user activates Eclipse window,
even if there are no Git configured projects in the workspace and no
changes in configured Git repositories.

Unfortunately even if the job detects that it has nothing to do, it
*always* triggers workspace change events and autobuild job executions.
ResourceRefreshJob is a subclass of InternalWorkspaceJob, so just via
entering runInWorkspace() method a sequence of calls below is always
executed:

workspace.prepareOperation()
workspace.beginOperation()
workspace.endOperation()

The last one always dispatches ResourceChangeEvent to all
IResourceChangeListener's and so triggers also auto build job (which
usually simply doesn't do anything). Although I have no example how it
can cause real harm in production environment, alone debugging the build
process in Eclipse is impossible because of permanent interruptions from
ResourceRefreshJob.

Change-Id: Idc23fd3cf4d71d36b16af2d4855770a4b70927cd
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java