JaroslavTulach commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r631671752
##########
File path:
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java
##########
@@ -179,6 +201,37 @@
}
throw new UnsupportedOperationException("Command not supported: " +
params.getCommand());
}
+
+ private CompletableFuture<Object> findProjectConfigurations(FileObject
ownedFile, String requestAction) {
+ return server.asyncOpenFileOwner(ownedFile).thenApply(p -> {
+ if (p == null) {
+ return
CompletableFuture.completedFuture(Collections.emptyList());
+ }
+ ProjectConfigurationProvider<ProjectConfiguration> provider =
p.getLookup().lookup(ProjectConfigurationProvider.class);
+ ActionProvider ap = p.getLookup().lookup(ActionProvider.class);
+ if (provider == null) {
+ return
CompletableFuture.completedFuture(Collections.emptyList());
+ }
+ ActionProvider.ConfigurationAware cap = null;
+ if (requestAction != null) {
+ if (!(ap instanceof ActionProvider.ConfigurationAware)) {
Review comment:
This check disables _on the fly_ switching of configurations in the VS
Code UI unless the project is known to support that by implementing the newly
introduced `ConfigurationAware` interface.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists