diff --git a/extension/jdtls.ext/com.microsoft.gradle.bs.importer/src/com/microsoft/gradle/bs/importer/GradleBuildServerProjectImporter.java b/extension/jdtls.ext/com.microsoft.gradle.bs.importer/src/com/microsoft/gradle/bs/importer/GradleBuildServerProjectImporter.java index ec7cc1f12..f81bd9611 100644 --- a/extension/jdtls.ext/com.microsoft.gradle.bs.importer/src/com/microsoft/gradle/bs/importer/GradleBuildServerProjectImporter.java +++ b/extension/jdtls.ext/com.microsoft.gradle.bs.importer/src/com/microsoft/gradle/bs/importer/GradleBuildServerProjectImporter.java @@ -84,6 +84,15 @@ public boolean applies(IProgressMonitor monitor) throws OperationCanceledExcepti directories = gradleDetector.scan(monitor); } + for (java.nio.file.Path directory : directories) { + IProject project = ProjectUtils.getProjectFromUri(directory.toUri().toString()); + // skip this importer if any of the project in workspace is already + // imported by other importers. + if (project != null && !Utils.isGradleBuildServerProject(project)) { + return false; + } + } + return !directories.isEmpty(); }