dbalek commented on a change in pull request #2587:
URL: https://github.com/apache/netbeans/pull/2587#discussion_r542178680



##########
File path: 
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/TextDocumentServiceImpl.java
##########
@@ -1063,20 +1044,10 @@ protected void 
performRewrite(JavaFix.TransformationContext ctx) throws Exceptio
         try {
             js.runUserActionTask(cc -> {
                 cc.toPhase(JavaSource.Phase.RESOLVED);
-
-                Pair<Set<VariableElement>, Set<VariableElement>> pair = 
GetterSetterGenerator.findMissingGettersSetters(cc, params.getRange(), false);
-                boolean missingGetters = !pair.first().isEmpty();
-                boolean missingSetters = !pair.second().isEmpty();
-                String uri = toUri(cc.getFileObject());
-
-                if (missingGetters) {
-                    
result.add(Either.forRight(createCodeGeneratorAction(Bundle.DN_GenerateGetters(),
 Server.GENERATE_GETTERS, uri, params.getRange())));
-                }
-                if (missingSetters) {
-                    
result.add(Either.forRight(createCodeGeneratorAction(Bundle.DN_GenerateSetters(),
 Server.GENERATE_SETTERS, uri, params.getRange())));
-                }
-                if (missingGetters && missingSetters) {
-                    
result.add(Either.forRight(createCodeGeneratorAction(Bundle.DN_GenerateGettersSetters(),
 Server.GENERATE_GETTERS_SETTERS, uri, params.getRange())));
+                for (CodeGenerator codeGenerator : Server.CODE_GENERATORS) {

Review comment:
       Yes.




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

Reply via email to