Skip to content

Commit 80c43f7

Browse files
authored
bugfix: Not show project node for non-java project (#245)
Signed-off-by: Sheng Chen <[email protected]>
1 parent 6f79e2f commit 80c43f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/ProjectCommand.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public static List<PackageNode> listProjects(List<Object> arguments, IProgressMo
4242
ArrayList<PackageNode> children = new ArrayList<>();
4343
List<IPath> paths = Arrays.asList(workspacePath);
4444
for (IProject project : projects) {
45+
if (!ProjectUtils.isJavaProject(project)) {
46+
continue;
47+
}
4548
if (project.exists() && (ResourceUtils.isContainedIn(project.getLocation(), paths) || Objects.equals(project.getName(), invisibleProjectName))) {
4649
PackageNode projectNode = new PackageNode(project.getName(), project.getFullPath().toPortableString(), NodeKind.PROJECT);
4750
projectNode.setUri(project.getLocationURI().toString());

0 commit comments

Comments
 (0)