mbien commented on code in PR #6150:
URL: https://github.com/apache/netbeans/pull/6150#discussion_r1255598053


##########
java/form/src/org/netbeans/modules/form/JavaCodeGenerator.java:
##########
@@ -2554,6 +2517,57 @@ private void generateListenerAddCode(RADComponent comp,
             generateCatchCode(exceptions, codeWriter);
     }
 
+    private void generateInnerClasses(Writer codeWriter, EventSetDescriptor 
eventSetDesc,List<Event> eventList) throws IOException {
+
+        if(formModel.getSettings().getGenerateListenersAsLambda() && 
eventSetDesc.getListenerMethods().length==1) {
+            generateWithLambda(codeWriter,eventSetDesc,eventList);
+        }else{

Review Comment:
   > I have doubts about the space before (evt) only
   
   sorry, I meant spaces in your code, not in generated code. 
   
   your code looks like this:
   ```java
           }else if(eventList.get(0).getEventHandlers().length > 1)
           {
   ```
   it should look like:
   ```java
           } else if (eventList.get(0).getEventHandlers().length > 1) {
   ```
   
   we try to avoid mixing too many styles in the same file, otherwise it looks 
like chaos.
   
   Braces are usually on the same line and add spaces before `({` and after 
`)}` and `,`
   ```java
               generateWithLambda(codeWriter,eventSetDesc,eventList);
   ```
   ->
   ```java
               generateWithLambda(codeWriter, eventSetDesc, eventList);
   ```
   thanks



-- 
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: [email protected]

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