Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When opening symbols, open the compilation unit from the relevant project #769

Closed
gayanper opened this issue Apr 20, 2022 · 1 comment
Closed

Comments

@gayanper
Copy link
Contributor

  • Open the multi module spring boot project which has spring beans spans over different modules in the workspace.
  • Search for a spring bean like a REST Controller symbol in the symbol explorer
  • Open the symbole

The symbol is opened as a source file outside the project, its just uses the parent project and then open the file from the parent project. This disables all the Java navigation since the file is not opened as CU in Eclipse.

STS4 Versions:
Spring Tool Suite 4 Main Feature 4.14.1.202204131622 org.springframework.boot.ide.main.feature.feature.group VMware, Inc.

Eclipse Version:
Version: 2022-06 (4.24)
Build id: I20220419-1800

@martinlippert martinlippert added this to the 4.15.0.RELEASE milestone Apr 20, 2022
kdvolder added a commit to kdvolder/lsp4e that referenced this issue Apr 21, 2022
In Eclipse workspace it is possible that a single file corresponds
to multiple workspace resources. This typically arises in 'multi-project'
setups where both the parent project and its nested children are
imported into the workspace.

This creates all sorts of confusions and subtle bugs.

The logical solution seems to be to deliberatly choose the
'most nested' resource instead of just arbitarily picking the
first one found.

This small does just that in LSPEclipseUtils.

This indirectly fixes issues in STS such as:

spring-projects/sts4#769
spring-projects/sts4#747
mickaelistria pushed a commit to eclipse/lsp4e that referenced this issue May 2, 2022
In Eclipse workspace it is possible that a single file corresponds
to multiple workspace resources. This typically arises in 'multi-project'
setups where both the parent project and its nested children are
imported into the workspace.

This creates all sorts of confusions and subtle bugs.

The logical solution seems to be to deliberatly choose the
'most nested' resource instead of just arbitarily picking the
first one found.

This small does just that in LSPEclipseUtils.

This indirectly fixes issues in STS such as:

spring-projects/sts4#769
spring-projects/sts4#747
@martinlippert
Copy link
Member

I think this is fixed with the contribution made to the LSP4E project, so closing here as fixed. Will ship as part of the next release, probably next week, and as part of the latest LSP4E releases in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants