You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "neilcsmith-net (via GitHub)" <gi...@apache.org> on 2023/04/24 17:38:57 UTC

[GitHub] [netbeans] neilcsmith-net opened a new pull request, #5876: Fix the Maven Compile on Save UI.

neilcsmith-net opened a new pull request, #5876:
URL: https://github.com/apache/netbeans/pull/5876

   Most importantly, make sure the Compile-on-Save feature can still be turned off via the UI.  No longer having it enabled by default is great; no longer being (easily) able to disable it less so! :smile: 
   
   The problem is that the value `v` is `null` when the default, as seen in CheckBoxUpdater.
   
   I also moved the warning dialog via invokeLater to make sure checkbox UI gets updated (at least on my system the tick doesn't show after the dialog opens). And I also temporarily hid the non-working help link - we can follow up to remove or point it at something more useful later.


-- 
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-unsubscribe@netbeans.apache.org

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


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

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


[GitHub] [netbeans] neilcsmith-net merged pull request #5876: Fix the Maven Compile on Save UI.

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net merged PR #5876:
URL: https://github.com/apache/netbeans/pull/5876


-- 
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-unsubscribe@netbeans.apache.org

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


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

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


[GitHub] [netbeans] mbien commented on a diff in pull request #5876: Fix the Maven Compile on Save UI.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5876:
URL: https://github.com/apache/netbeans/pull/5876#discussion_r1175671022


##########
java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java:
##########
@@ -162,15 +166,18 @@ public Boolean getValue() {
             public void setValue(Boolean v) {
                 handle.removePOMModification(operation);
                 modifiedValue = null;
-                String value = v != null ? (v ? "all" : "none") : "all";
+                boolean cosEnabled = v != null ? v : getDefaultValue();
+                String value = cosEnabled ? "all" : "none";

Review Comment:
   if we set this to:
   `String value = cosEnabled ? "all" : null;`
   it would remove the property entirely (and the file too) if it is turned off.
   
   CheckBoxUpdater isn't setting the bold/plain setting properly, but this is a problem for all check boxes in this panel.



-- 
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-unsubscribe@netbeans.apache.org

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


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

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


[GitHub] [netbeans] neilcsmith-net commented on a diff in pull request #5876: Fix the Maven Compile on Save UI.

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on code in PR #5876:
URL: https://github.com/apache/netbeans/pull/5876#discussion_r1176232611


##########
java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java:
##########
@@ -162,15 +166,18 @@ public Boolean getValue() {
             public void setValue(Boolean v) {
                 handle.removePOMModification(operation);
                 modifiedValue = null;
-                String value = v != null ? (v ? "all" : "none") : "all";
+                boolean cosEnabled = v != null ? v : getDefaultValue();
+                String value = cosEnabled ? "all" : "none";

Review Comment:
   I'd be inclined to consider that in the NB19 timeframe rather than here. Previous releases have always stored the value, whichever it is. Let's keep that behaviour for now, and just keep the changed default - useful for people switching between 17 & 18, and just in case there's any other edge cases in there.
   
   The bold is kind of correct, if unintuitive - it seems to be whenever the value is set in `nb-configuration` no matter if it matches the default or not.  Another example of this being ternary logic rather than boolean.



-- 
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-unsubscribe@netbeans.apache.org

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


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

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