You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/02/17 14:06:46 UTC

[GitHub] [netbeans] sdedic opened a new pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

sdedic opened a new pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768


   Followup to #2764 - when the project is trusted, but not permanently, the Gradle Execution panel in Project Customizer may show the project as trusted (checkbox selected). When the project options are saved, the project's trust will be recorded permanently.
   
   This PR changes appearance of the checkbox to a tri-state, allowing the 3rd "shadowed" state in the case the project is trusted, but not permanently trusted. It visually indicates the state 'in between', so the user may  choose to change the trust to permanent, or revoke it.
   
   If the project is not trusted or trusted permanenly, the checkbox behaves just as the standard one.


----------------------------------------------------------------
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:
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] sdedic commented on pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-780599167


   Note for myself: @neilcsmith-net  noticed a typo in PR #2764; can be fixed here if this PR is approved, or PR #2769


----------------------------------------------------------------
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:
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] lkishalmi commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604108654



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -37,7 +42,10 @@
             + "automatically trusted.</p>",
 })
 public class GradleExecutionPanel extends javax.swing.JPanel {
-
+    private static final String LEVEL_PERMANENT = "Permanent"; // NOI18N

Review comment:
       Well, this is a bit ugly '90-es style.
   Let's have an enum Level { PERMANENT, TEMPORARY, NONE } instead.

##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -110,17 +150,27 @@ private void initComponents() {
     }// </editor-fold>//GEN-END:initComponents
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JCheckBox cbTrustProject;
+    private javax.swing.JComboBox<String> cbTrustLevel;

Review comment:
       That could be JComboBox<Level>

##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -69,17 +100,20 @@ public GradleExecutionPanel(Project project) {
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private void initComponents() {
 
-        cbTrustProject = new javax.swing.JCheckBox();
         lbTrustTerms = new javax.swing.JLabel();
         lbReadOnly = new javax.swing.JLabel();
-
-        org.openide.awt.Mnemonics.setLocalizedText(cbTrustProject, org.openide.util.NbBundle.getMessage(GradleExecutionPanel.class, "GradleExecutionPanel.cbTrustProject.text")); // NOI18N
+        cbTrustLevel = new javax.swing.JComboBox<>();
+        lbTrustLevel = new javax.swing.JLabel();
 
         lbTrustTerms.setVerticalAlignment(javax.swing.SwingConstants.TOP);
 
         lbReadOnly.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/netbeans/modules/gradle/resources/info.png"))); // NOI18N
         org.openide.awt.Mnemonics.setLocalizedText(lbReadOnly, org.openide.util.NbBundle.getMessage(GradleExecutionPanel.class, "GradleExecutionPanel.lbReadOnly.text")); // NOI18N
 
+        cbTrustLevel.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "None", "Temporary", "Permanent" }));

Review comment:
       Later on a new model can be created from Level.values()

##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -54,9 +62,32 @@ public GradleExecutionPanel(Project project) {
         GradleBaseProject gbp = GradleBaseProject.get(project);
         if (gbp != null) {
             lbReadOnly.setVisible(!gbp.isRoot());
-            cbTrustProject.setEnabled(gbp.isRoot());
+            lbTrustLevel.setEnabled(gbp.isRoot());
+            cbTrustLevel.setEnabled(gbp.isRoot());
             lbTrustTerms.setEnabled(gbp.isRoot());
-            cbTrustProject.setSelected(ProjectTrust.getDefault().isTrusted(project));
+            
+            if (ProjectTrust.getDefault().isTrustedPermanetly(project)) {
+                cbTrustLevel.setSelectedItem(LEVEL_PERMANENT);
+            } else if (ProjectTrust.getDefault().isTrusted(project)) {
+                cbTrustLevel.setSelectedItem(LEVEL_TEMPORARY);
+            } else {
+                cbTrustLevel.setSelectedItem(LEVEL_NONE);
+            }
+            
+            cbTrustLevel.setRenderer(new DefaultListCellRenderer() {
+                @Override
+                public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+                    if (value == null) {
+                        value = ""; // NOI18N
+                    } else {
+                        try {
+                            value = NbBundle.getMessage(GradleExecutionPanel.class, "GradleExecutionPanel.cbTrustLevel." + value.toString()); // NOI18N

Review comment:
       If you add this line into the Level enum toString() method, then you do not need a new cell renderer.

##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -110,17 +150,27 @@ private void initComponents() {
     }// </editor-fold>//GEN-END:initComponents
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JCheckBox cbTrustProject;
+    private javax.swing.JComboBox<String> cbTrustLevel;
     private javax.swing.JLabel lbReadOnly;
+    private javax.swing.JLabel lbTrustLevel;
     private javax.swing.JLabel lbTrustTerms;
     // End of variables declaration//GEN-END:variables
 
     void save() {
         if (project != null) {
-            if (cbTrustProject.isSelected()) {
-                ProjectTrust.getDefault().trustProject(project);
-            } else {
+            Object v = cbTrustLevel.getSelectedItem();
+            if (v == null) {
+                v = LEVEL_NONE;
+            }
+            if (LEVEL_NONE.equals(v)) {

Review comment:
       You have enums, use a switch (It would have worked with strings as well)

##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -69,17 +100,20 @@ public GradleExecutionPanel(Project project) {
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private void initComponents() {
 
-        cbTrustProject = new javax.swing.JCheckBox();
         lbTrustTerms = new javax.swing.JLabel();
         lbReadOnly = new javax.swing.JLabel();
-
-        org.openide.awt.Mnemonics.setLocalizedText(cbTrustProject, org.openide.util.NbBundle.getMessage(GradleExecutionPanel.class, "GradleExecutionPanel.cbTrustProject.text")); // NOI18N
+        cbTrustLevel = new javax.swing.JComboBox<>();
+        lbTrustLevel = new javax.swing.JLabel();
 
         lbTrustTerms.setVerticalAlignment(javax.swing.SwingConstants.TOP);
 
         lbReadOnly.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/netbeans/modules/gradle/resources/info.png"))); // NOI18N
         org.openide.awt.Mnemonics.setLocalizedText(lbReadOnly, org.openide.util.NbBundle.getMessage(GradleExecutionPanel.class, "GradleExecutionPanel.lbReadOnly.text")); // NOI18N
 
+        cbTrustLevel.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "None", "Temporary", "Permanent" }));

Review comment:
       Not required here, just click on the use default. on the form editor to remove this line.




-- 
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:
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] lkishalmi commented on pull request #2768: Trust checkbox changed to tri-option combobox to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-810590140


   Thank you! It's beautiful now! Merging!


-- 
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:
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] lkishalmi merged pull request #2768: Trust checkbox changed to tri-option combobox to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
lkishalmi merged pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768


   


-- 
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:
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] sdedic commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604142497



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -110,17 +150,27 @@ private void initComponents() {
     }// </editor-fold>//GEN-END:initComponents
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JCheckBox cbTrustProject;
+    private javax.swing.JComboBox<String> cbTrustLevel;

Review comment:
       > That could be JComboBox
   
   you mean without  the generic ?




-- 
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:
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] sdedic commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604336220



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -37,6 +39,18 @@
             + "automatically trusted.</p>",
 })
 public class GradleExecutionPanel extends javax.swing.JPanel {
+    
+    private enum TrustLevel {
+        Permanent,

Review comment:
       Addressed in 408497c739




-- 
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:
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] lkishalmi commented on pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-780688554


   Are you sure that the tri-state checkbox is the best UI representation?


----------------------------------------------------------------
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:
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] lkishalmi commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604230822



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -110,17 +141,33 @@ private void initComponents() {
     }// </editor-fold>//GEN-END:initComponents
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JCheckBox cbTrustProject;
+    private javax.swing.JComboBox<TrustLevel> cbTrustLevel;
     private javax.swing.JLabel lbReadOnly;
+    private javax.swing.JLabel lbTrustLevel;
     private javax.swing.JLabel lbTrustTerms;
     // End of variables declaration//GEN-END:variables
 
     void save() {
         if (project != null) {
-            if (cbTrustProject.isSelected()) {
-                ProjectTrust.getDefault().trustProject(project);
-            } else {
-                ProjectTrust.getDefault().distrustProject(project);
+            TrustLevel v = (TrustLevel)cbTrustLevel.getSelectedItem();
+            if (v == null) {
+                v = TrustLevel.None;
+            }
+            switch (v) {

Review comment:
       Much readable now!




-- 
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:
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] sdedic commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604141498



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -37,7 +42,10 @@
             + "automatically trusted.</p>",
 })
 public class GradleExecutionPanel extends javax.swing.JPanel {
-
+    private static final String LEVEL_PERMANENT = "Permanent"; // NOI18N

Review comment:
       > Well, this is a bit ugly '90-es style.
   
   a matter of style, but indeed should adhere to the module's overall style. Will enum-erate.




-- 
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:
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] sdedic commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604166052



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -37,7 +42,10 @@
             + "automatically trusted.</p>",
 })
 public class GradleExecutionPanel extends javax.swing.JPanel {
-
+    private static final String LEVEL_PERMANENT = "Permanent"; // NOI18N

Review comment:
       Redone in 7e035b7

##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -69,17 +100,20 @@ public GradleExecutionPanel(Project project) {
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private void initComponents() {
 
-        cbTrustProject = new javax.swing.JCheckBox();
         lbTrustTerms = new javax.swing.JLabel();
         lbReadOnly = new javax.swing.JLabel();
-
-        org.openide.awt.Mnemonics.setLocalizedText(cbTrustProject, org.openide.util.NbBundle.getMessage(GradleExecutionPanel.class, "GradleExecutionPanel.cbTrustProject.text")); // NOI18N
+        cbTrustLevel = new javax.swing.JComboBox<>();
+        lbTrustLevel = new javax.swing.JLabel();
 
         lbTrustTerms.setVerticalAlignment(javax.swing.SwingConstants.TOP);
 
         lbReadOnly.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/netbeans/modules/gradle/resources/info.png"))); // NOI18N
         org.openide.awt.Mnemonics.setLocalizedText(lbReadOnly, org.openide.util.NbBundle.getMessage(GradleExecutionPanel.class, "GradleExecutionPanel.lbReadOnly.text")); // NOI18N
 
+        cbTrustLevel.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "None", "Temporary", "Permanent" }));

Review comment:
       Fixed in 7e035b7

##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -110,17 +150,27 @@ private void initComponents() {
     }// </editor-fold>//GEN-END:initComponents
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JCheckBox cbTrustProject;
+    private javax.swing.JComboBox<String> cbTrustLevel;
     private javax.swing.JLabel lbReadOnly;
+    private javax.swing.JLabel lbTrustLevel;
     private javax.swing.JLabel lbTrustTerms;
     // End of variables declaration//GEN-END:variables
 
     void save() {
         if (project != null) {
-            if (cbTrustProject.isSelected()) {
-                ProjectTrust.getDefault().trustProject(project);
-            } else {
+            Object v = cbTrustLevel.getSelectedItem();
+            if (v == null) {
+                v = LEVEL_NONE;
+            }
+            if (LEVEL_NONE.equals(v)) {

Review comment:
       Fixed in 7e035b7

##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -110,17 +150,27 @@ private void initComponents() {
     }// </editor-fold>//GEN-END:initComponents
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JCheckBox cbTrustProject;
+    private javax.swing.JComboBox<String> cbTrustLevel;

Review comment:
       Fixed in 7e035b7




-- 
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:
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] sdedic commented on pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-802041370


   Recommitted - instead of a checkbox, a dropdown is presented with 3 options (Do no trust, trust just now, trust permanently).


-- 
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:
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] geertjanw commented on pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
geertjanw commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-810019668


   How ready is this for 12.4?


-- 
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:
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] sdedic commented on pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-802771908


   Jarda says his Swing-fu is not good enough, so asking @dbalek for assistance.


-- 
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:
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] sdedic commented on pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-780775484


   I didn't want to change the UI that much. But if you prefer, a drop-down could be a better choice.


----------------------------------------------------------------
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:
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] sdedic commented on pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-782248916


   Okay. "Trusted", "Not trusted" are the obvious choices. Could you suggest a suitable wording for the intermediate state ("Allowed", "Trust in this IDE run") -- especially if #2769 goes for the SPI approach, so the project can be authorized by some other service ?


----------------------------------------------------------------
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:
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] lkishalmi commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604232781



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -37,6 +39,18 @@
             + "automatically trusted.</p>",
 })
 public class GradleExecutionPanel extends javax.swing.JPanel {
+    
+    private enum TrustLevel {
+        Permanent,

Review comment:
       I missed to save this comment:
   enum values should be all caps.
   Also you can staticly import them so no longer needs to dereference them with TrustLevel




-- 
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:
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] lkishalmi commented on pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-782211136


   I'd go with a combo box instead of the tri-state checkbox.


----------------------------------------------------------------
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:
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] dbalek commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
dbalek commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r603893479



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/Bundle.properties
##########
@@ -44,5 +44,8 @@ BuildActionsCustomizer.jLabel1.text=Configure Action:
 ProjectInfoPanel.jLabel6.text=Included Builds:
 BuildActionsCustomizer.cbRepeatable.toolTipText=Is this action allowed to be rerun from the output tab?
 BuildActionsCustomizer.lbReloadHints.text=<html>Reload Project after this action:\n<ul>\n<li><b>NEVER:</b> Do not reload.</li>\n<li><b>DEFAULT:</b> Reload only if the project had some problems.</li>\n<li><b>ALWAYS:</b> Always reload the project.</li>\n<li><b>ALWAYS_ONLINE:</b> Always reload the project, allowing Gradle to go online.</li>\n</ul>
-GradleExecutionPanel.cbTrustProject.text=Trust Gradle execution on this project
 GradleExecutionPanel.lbReadOnly.text=Can be changed on the root project only.
+GradleExecutionPanel.lbTrustLevel.text=Tust level:

Review comment:
       Typo: `Tust level:` -> `Trust level`




-- 
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:
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] lkishalmi commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604145371



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -110,17 +150,27 @@ private void initComponents() {
     }// </editor-fold>//GEN-END:initComponents
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JCheckBox cbTrustProject;
+    private javax.swing.JComboBox<String> cbTrustLevel;

Review comment:
       No. Use the enum type.




-- 
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:
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] sdedic commented on pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#issuecomment-810023563


   Lacks a positive review. Previous comments have been incorporated.
   Will ping the reviewers.


-- 
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:
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] sdedic commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604166700



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/GradleExecutionPanel.java
##########
@@ -54,9 +62,32 @@ public GradleExecutionPanel(Project project) {
         GradleBaseProject gbp = GradleBaseProject.get(project);
         if (gbp != null) {
             lbReadOnly.setVisible(!gbp.isRoot());
-            cbTrustProject.setEnabled(gbp.isRoot());
+            lbTrustLevel.setEnabled(gbp.isRoot());
+            cbTrustLevel.setEnabled(gbp.isRoot());
             lbTrustTerms.setEnabled(gbp.isRoot());
-            cbTrustProject.setSelected(ProjectTrust.getDefault().isTrusted(project));
+            
+            if (ProjectTrust.getDefault().isTrustedPermanetly(project)) {
+                cbTrustLevel.setSelectedItem(LEVEL_PERMANENT);
+            } else if (ProjectTrust.getDefault().isTrusted(project)) {
+                cbTrustLevel.setSelectedItem(LEVEL_TEMPORARY);
+            } else {
+                cbTrustLevel.setSelectedItem(LEVEL_NONE);
+            }
+            
+            cbTrustLevel.setRenderer(new DefaultListCellRenderer() {
+                @Override
+                public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+                    if (value == null) {
+                        value = ""; // NOI18N
+                    } else {
+                        try {
+                            value = NbBundle.getMessage(GradleExecutionPanel.class, "GradleExecutionPanel.cbTrustLevel." + value.toString()); // NOI18N

Review comment:
       Fixed in 7e035b7




-- 
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:
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] sdedic commented on a change in pull request #2768: Trust checkbox made tri-state to indicate temporal trust.

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2768:
URL: https://github.com/apache/netbeans/pull/2768#discussion_r604166910



##########
File path: extide/gradle/src/org/netbeans/modules/gradle/customizer/Bundle.properties
##########
@@ -44,5 +44,8 @@ BuildActionsCustomizer.jLabel1.text=Configure Action:
 ProjectInfoPanel.jLabel6.text=Included Builds:
 BuildActionsCustomizer.cbRepeatable.toolTipText=Is this action allowed to be rerun from the output tab?
 BuildActionsCustomizer.lbReloadHints.text=<html>Reload Project after this action:\n<ul>\n<li><b>NEVER:</b> Do not reload.</li>\n<li><b>DEFAULT:</b> Reload only if the project had some problems.</li>\n<li><b>ALWAYS:</b> Always reload the project.</li>\n<li><b>ALWAYS_ONLINE:</b> Always reload the project, allowing Gradle to go online.</li>\n</ul>
-GradleExecutionPanel.cbTrustProject.text=Trust Gradle execution on this project
 GradleExecutionPanel.lbReadOnly.text=Can be changed on the root project only.
+GradleExecutionPanel.lbTrustLevel.text=Tust level:

Review comment:
       Fixed in 25d60aa




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