microsoft / vscode-java-dependency

Manage Java projects in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency
MIT License
140 stars 68 forks source link

Show type hierarchy don't work even refresh or clear #807

Closed xzbdmw closed 6 months ago

xzbdmw commented 6 months ago

https://github.com/microsoft/vscode-java-dependency/assets/97848247/0e173f50-96bc-4cbb-8e3b-a5ed11931f35

xzbdmw commented 6 months ago

Maybe this is other plugin's work?don't sure

jdneo commented 6 months ago

That's the feature belongs to redhat.java.

Could you share your project folder? Let me see if I can repro it on my side.

xzbdmw commented 6 months ago

It's a really simple folder and vscode version is 1.85 with the latest java extension pack suanfa.zip

jdneo commented 6 months ago

Is your JRE System Library points to a JRE or JDK?

xzbdmw commented 6 months ago

Do you mean this setting ? "java.jdt.ls.java.home": "/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home"

jdneo commented 6 months ago

Ok, that seems a valid JDK. Is there any exception in the server log?

xzbdmw commented 6 months ago

It breaks randomly https://github.com/microsoft/vscode-java-dependency/assets/97848247/4582b111-88b4-49d0-8250-8ad085b4ba94

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:28.669 !MESSAGE ClassFile contents request completed

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:28.686 !MESSAGE User abort while collecting the document symbols.

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:48.731 !MESSAGE >> shutdown

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:48.733 !MESSAGE >> exit

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:48.761 !MESSAGE Shutdown received... waking up main thread

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:48.765 !MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is stopping: !SESSION 2023-12-13 12:51:51.710 ----------------------------------------------- eclipse.buildId=unknown java.version=17.0.9 java.vendor=Eclipse Adoptium BootLoader constants: OS=macosx, ARCH=aarch64, WS=cocoa, NL=zhCN#Hans Framework arguments: --stdio Command-line arguments: -data /Users/xzb/Library/Application Support/Code/User/workspaceStorage/6abd9e3d6881e667ebb4ebb209f32f6e/redhat.java/jdt_ws --stdio

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:53.583 !MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:53.720 !MESSAGE Main thread is waiting

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:53.744 !MESSAGE >> initialize

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:53.746 !MESSAGE Initializing Java Language Server 1.30.1.202312070241

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:53.747 !MESSAGE Started org.eclipse.m2e.core 0ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.346 !MESSAGE ProjectRegistryRefreshJob finished 599ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.363 !MESSAGE Started org.eclipse.buildship.core 16ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.393 !MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.393 !MESSAGE Non-Static Commands: [java.project.import, java.project.changeImportedProjects, java.navigate.openTypeHierarchy, java.project.resolveStackTraceLocation, java.edit.handlePasteEvent, java.edit.stringFormatting, java.project.getSettings, java.project.resolveWorkspaceSymbol, java.project.upgradeGradle, java.project.createModuleInfo, java.vm.getAllInstalls, java.edit.organizeImports, java.project.refreshDiagnostics, java.project.removeFromSourcePath, java.project.listSourcePaths, java.project.getAll, java.reloadBundles, java.project.isTestFile, java.project.getClasspaths, java.navigate.resolveTypeHierarchy, java.edit.smartSemicolonDetection, java.project.updateSourceAttachment, java.decompile, java.protobuf.generateSources, java.project.resolveSourceAttachment, java.project.updateJdk, java.project.addToSourcePath, java.completion.onDidSelect]

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.393 !MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.393 !MESSAGE Non-Static Commands: [vscode.java.checkProjectSettings, vscode.java.isOnClasspath, vscode.java.fetchUsageData, vscode.java.validateLaunchConfig, vscode.java.resolveInlineVariables, vscode.java.resolveClassFilters, vscode.java.resolveMainMethod, vscode.java.resolveClasspath, vscode.java.resolveBuildFiles, vscode.java.resolveMainClass, vscode.java.updateDebugSettings, vscode.java.resolveSourceUri, vscode.java.fetchPlatformSettings, vscode.java.buildWorkspace, vscode.java.startDebugSession, vscode.java.inferLaunchCommandLength, vscode.java.resolveElementAtSelection, vscode.java.resolveJavaExecutable]

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.393 !MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.394 !MESSAGE Non-Static Commands: [vscode.java.test.findJavaProjects, vscode.java.test.findTestPackagesAndTypes, vscode.java.test.findTestTypesAndMethods, vscode.java.test.resolvePath, vscode.java.test.findTestLocation, vscode.java.test.get.testpath, vscode.java.test.findDirectTestChildrenForClass, vscode.java.test.navigateToTestOrTarget, vscode.java.test.junit.argument, vscode.java.test.generateTests]

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.394 !MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.394 !MESSAGE Non-Static Commands: [java.maven.initializeSearcher, java.maven.searchArtifact, java.maven.addDependency, java.maven.controlContext]

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.394 !MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.394 !MESSAGE Non-Static Commands: [java.project.refreshLib, java.project.checkImportStatus, java.project.list, java.project.generateJar, java.project.getMainClasses, java.getPackageData, java.resolvePath]

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.406 !MESSAGE RepositoryRegistryUpdateJob finished 0ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.408 !MESSAGE >> initialized

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.899 !MESSAGE Workspace initialized in 493ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.912 !MESSAGE >> initialization job finished

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.916 !MESSAGE >> registerWatchers'

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:54.917 !MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:55.656 !MESSAGE Reconciled 2. Took 3 ms

!ENTRY java-debug 1 0 2023-12-13 12:51:55.667 !MESSAGE Starting com.microsoft.java.debug.plugin

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:55.896 !MESSAGE >> Updating classpath for project Zuo_8aea53db

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:55.899 !MESSAGE >> Adding /Users/xzb/IdeaProjects/Zuo/lib/kotlin-stdlib-jdk8.jar to the classpath

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:55.899 !MESSAGE >> Adding /Users/xzb/IdeaProjects/Zuo/lib/kotlin-stdlib-jdk7.jar to the classpath

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:55.899 !MESSAGE >> Adding /Users/xzb/IdeaProjects/Zuo/lib/kotlin-reflect.jar to the classpath

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:55.899 !MESSAGE >> Adding /Users/xzb/IdeaProjects/Zuo/lib/kotlin-stdlib.jar to the classpath

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:55.899 !MESSAGE >> Adding /Users/xzb/IdeaProjects/Zuo/lib/kotlin-test.jar to the classpath

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:56.259 !MESSAGE Reconciled 1. Took 0 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:56.906 !MESSAGE >> build jobs finished

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:56.913 !MESSAGE Reconciled 1. Took 36 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:57.524 !MESSAGE begin problem for /ConvertToLetter.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:57.525 !MESSAGE 4 problems reported for /ConvertToLetter.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:57.531 !MESSAGE begin problem for /Coins.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:57.531 !MESSAGE 0 problems reported for /Coins.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:51:57.531 !MESSAGE Validated 2. Took 15 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:52:05.307 !MESSAGE ClassFile contents request completed

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:52:23.477 !MESSAGE ClassFile contents request completed

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:52:24.258 !MESSAGE ClassFile contents request completed

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:52:30.161 !MESSAGE ClassFile contents request completed

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:52:31.168 !MESSAGE >> java/validateDocument

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:52:31.582 !MESSAGE begin problem for /Coins.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:52:31.583 !MESSAGE 0 problems reported for /Coins.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:52:31.583 !MESSAGE Validated 1. Took 12 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-12-13 12:52:40.657 !MESSAGE ClassFile contents request completed

jdneo commented 6 months ago

I found that if you keep the reference view at the left side bar, it always works. You can try drag it to the left side bar and reload your VS Code.

Screenshot 2023-12-13 at 12 57 33

If you drag it into the explorer view, it starts to fail.

Does the above statement apply on your side?

xzbdmw commented 6 months ago

Maybe this is a client side bug because later query such as call hierarchy is broken just after the type hierarchy is broken

jdneo commented 6 months ago

Need some further investigation. Because I tried the same approach for TS language, everything works fine no matter where the reference view is placed.

xzbdmw commented 6 months ago

I found that if you keep the reference view at the left side bar, it always works. You can try drag it to the left side bar and reload your VS Code.

Screenshot 2023-12-13 at 12 57 33

If you drag it into the explorer view, it starts to fail.

Does the above statement apply on your side?

This is the same too, I think my custom-css extension make this view break😭

image
jdneo commented 6 months ago

Filed an issue at https://github.com/redhat-developer/vscode-java/issues/3429.