Skip to content

Conversation

@sdedic
Copy link
Member

@sdedic sdedic commented Jan 12, 2023

If the LSP client added a folder to a workspace, then opened a file, NBLS would ask a question "File XXX is part of project Foo, do you want to open ... ?". Since the containing folder was explicitly adeded the lsp client's user, this question is ... silly.

It was caused by NBLS did not receive/process didChangeWorkspaceFolders notification from the LSP client. On the startup, workspace folders were 'registered' as known and NBLS does not ask "project open question" for files beneath those folders - but when the folders change during NBLS run, the added folders were not 'registered' in the same way.

@sdedic sdedic added kind:bug Bug report or fix LSP [ci] enable Language Server Protocol tests VSCode Extension labels Jan 12, 2023
@sdedic sdedic added this to the NB17 milestone Jan 12, 2023
@sdedic sdedic requested review from MartinBalin and dbalek January 12, 2023 13:32
@sdedic sdedic self-assigned this Jan 12, 2023
@MartinBalin
Copy link
Contributor

Please add also to VSNetBeans_1603 branch

return;
}
ProjectInformation pi = ProjectUtils.getInformation(projects[0]);
String n = pi.getDisplayName();
Copy link
Contributor

Choose a reason for hiding this comment

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

lines 1207 - 1213 look like they should belong to ProjectInformation class

Copy link
Member Author

Choose a reason for hiding this comment

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

lines 1207 - 1213 look like they should belong to ProjectInformation class

Rather to ProjectUtils; but yes, some "give-me-suitable-project-name-with-all-fallbacks' could be useful, I did this chain of null checks several times already. I'll address in a separate PR.

Copy link
Contributor

@dbalek dbalek left a comment

Choose a reason for hiding this comment

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

Looks fine.

@sdedic sdedic merged commit cac7e65 into apache:master Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug Bug report or fix LSP [ci] enable Language Server Protocol tests VSCode Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants