Skip to content

Conversation

shivam71
Copy link
Member

  • Compact source files in java don't have top level class.
  • Methods and fields are allowed as top level elements .
  • Due to the erroneous computation of the end position for the hidden final class created to scaffold the compact source file methods and fields the outline view was not showing the document symbols for these files.
  • This patch does a simple fix to ensure that the LSP backend sends ranges where end position for a document symbol if not found is taken same as the start position .
  • Final fix could perhaps correct the end position computation directly .

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 18, 2025
Copy link
Member

@sid-srini sid-srini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shivam71 for investigating this issue. Some suggestions on the temp fix are below.

@Achal1607 Achal1607 added this to the JVSC 25.0.0 milestone Sep 19, 2025
@shivam71 shivam71 force-pushed the compact_src_file_outline_fix branch from cec1a0c to 2ba521c Compare September 22, 2025 12:51
sid-srini
sid-srini previously approved these changes Sep 22, 2025
Copy link
Member

@sid-srini sid-srini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @shivam71 for further refining the fix. LGTM 👍

@shivam71
Copy link
Member Author

Netbeans PR #8856

@sid-srini
Copy link
Member

Netbeans PR #8856

nit: would you please rename the patch file to 8856-draft.diff so that we may track it better when integrating a future NB milestone. Thanks

@sid-srini sid-srini changed the title Temp patch for fixing outline view of compact source files Fixing outline view of compact source files Sep 24, 2025
@shivam71 shivam71 force-pushed the compact_src_file_outline_fix branch from 2ba521c to d2b29d2 Compare September 24, 2025 05:59
@shivam71 shivam71 force-pushed the compact_src_file_outline_fix branch from d2b29d2 to 191ae63 Compare September 24, 2025 06:13
@sid-srini sid-srini merged commit faf5a6a into oracle:main Sep 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants