Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwecai2014-06-09 03:41:33 -0400
committerIgor Fedorenko2014-06-09 11:29:33 -0400
commitd2c2e62cfd1d2c55d7d75a173b0940b7575ea14d (patch)
tree165c95e73f77d7dd64109039ba5d882ecd7341c9
parent02e4f1db21e0cec77ad6470be7f55790c80c977d (diff)
downloadm2e-core-d2c2e62cfd1d2c55d7d75a173b0940b7575ea14d.tar.gz
m2e-core-d2c2e62cfd1d2c55d7d75a173b0940b7575ea14d.tar.xz
m2e-core-d2c2e62cfd1d2c55d7d75a173b0940b7575ea14d.zip
[436679]: ProjectRegistryRefreshJob double work for imported projects
Change-Id: I64c8f19075f491b2228199fba9e7cf066273ee27 Signed-off-by: wecai <wecai@ebay.com>
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java
index faa0704b..bd85432d 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob.java
@@ -166,7 +166,9 @@ public class ProjectRegistryRefreshJob extends Job implements IResourceChangeLis
if(!isMavenProject(project)) {
continue;
}
- if((projectDelta.getFlags() & IResourceDelta.OPEN) != 0) {
+
+ //Bug 436679: queue update request only for reopened projects. For imported projects, delta.getKind() == IResourceDelta.ADDED
+ if((projectDelta.getKind() == IResourceDelta.CHANGED && (projectDelta.getFlags() & IResourceDelta.OPEN) != 0)) {
queue(new MavenUpdateRequest(project, offline, forceDependencyUpdate));
} else if(!autobuilding && projectChanged(projectDelta)) {
IMavenProjectFacade facade = manager.getProject(project);

Back to the top