lahodaj commented on code in PR #8655:
URL: https://github.com/apache/netbeans/pull/8655#discussion_r2280317772


##########
ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/refactoring/Refactoring.java:
##########
@@ -160,29 +148,28 @@ public Problem prepare(RefactoringElementsBag 
refactoringElements) {
                         refactoringElements.add(query, new 
LSPRefactoringElementImpl(annotatedLine, file, bounds));
                     }
                 }
-                runningRequest = null;
-                return null;
-            } catch (CancellationException ex) {
-                return new Problem(false, Bundle.TXT_Canceled());
-            } catch (InterruptedException | ExecutionException ex) {
-                Exceptions.printStackTrace(ex);
-                return new Problem(true, ex.getLocalizedMessage());
-            }
+            };
+
+            Utils.handleBindings(servers,
+                                 server -> true,
+                                 () -> params,
+                                 (server, params) -> 
server.getTextDocumentService().references(params),
+                                 handleResult);
+
+            return getProblem();
         }
 
     }
 
-    private static final class RenameRefactoringPlugin implements 
RefactoringPlugin {
+    private static final class RenameRefactoringPlugin extends RefactoringBase 
implements RefactoringPlugin {
 
         private final RenameRefactoring refactoring;
-        private final LSPBindings bindings;
+        private final List<LSPBindings> servers;
         private final RenameParams params;
-        private final AtomicBoolean cancel = new AtomicBoolean();
-        private volatile CompletableFuture<WorkspaceEdit> runningRequest;
 
-        public RenameRefactoringPlugin(RenameRefactoring refactoring, 
LSPBindings bindings, RenameParams params) {
+        public RenameRefactoringPlugin(RenameRefactoring refactoring, 
List<LSPBindings> servers, RenameParams params) {

Review Comment:
   Mostly intentional - I think I was using mostly `List<LSPBindings>`, but 
that's not really something that should be put into a `Lookup`, so for things 
that are in lookup (or end up there), it is `LSPBindingsCollection`.
   
   Thanks for the comments! I think I've reflected the other ones.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to