microsoft / microsoft/vscode-java-dependency
Project Manager doesn't need to search the main methods if a project doesn't have the Java nature
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 199
- Forks
- 105
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 27
Description
Steps to reproduce:
- start VS Code with
Extension Pack for Java v0.29.2024091906 (pre-release) - import the weblaf project
You will see the following exception:
[Error - 4:26:05 AM] Nov 16, 2024, 4:26:05?AM Problems occurred when invoking code from plug-in: "org.eclipse.jdt.ls.core".
weblaf-parent does not exist
Java Model Exception: Error in Java Model (code 969): weblaf-parent does not exist
at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:546)
at org.eclipse.jdt.internal.core.JavaModelManager.getPerProjectInfoCheckExistence(JavaModelManager.java:2535)
at org.eclipse.jdt.internal.core.JavaProject.getPerProjectInfo(JavaProject.java:2329)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2402)
at org.eclipse.jdt.internal.core.JavaProject.getAllPackageFragmentRoots(JavaProject.java:1774)
at org.eclipse.jdt.internal.core.JavaProject.getAllPackageFragmentRoots(JavaProject.java:1765)
at com.microsoft.jdtls.ext.core.ProjectCommand.getMainClasses(ProjectCommand.java:243)
at com.microsoft.jdtls.ext.core.CommandHandler.executeCommand(CommandHandler.java:35)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:230)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:220)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:609)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:690)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:527)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1458)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2034)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:189)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ProjectCommand.getMainClasses, the entry point named in the exception, and reproduce the problem by importing the linked weblaf project with the specified VS Code Java extension version. Done means importing a project without the Java nature no longer triggers the missing-project exception while searching for main classes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100