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 2020/02/05 21:01:02 UTC
[GitHub] [netbeans] lkishalmi opened a new pull request #1925: Add UI to be
able to disable Janitor on the Startup
lkishalmi opened a new pull request #1925: Add UI to be able to disable Janitor on the Startup
URL: https://github.com/apache/netbeans/pull/1925
Well, I've added some UI Support:
The Options Dialog:

The cleanup action:

----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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] AlexFalappa edited a comment on issue #1925: Add UI to
be able to disable Janitor on the Startup
Posted by GitBox <gi...@apache.org>.
AlexFalappa edited a comment on issue #1925: Add UI to be able to disable Janitor on the Startup
URL: https://github.com/apache/netbeans/pull/1925#issuecomment-582855963
Hi @lkishalmi , just looking at the screenshots I find a bit odd that label ending with **"... #days:"**. As far as I can tell there are no such abbreviations nowhere else in NetBeans.
I suggest having either a "days" label after the combo box or changing the label into something along the lines of "Removal age (number of days):" or perhaps "Removal threshold (number of days):".
There is also a typo in the last label: "**Junitor** run." instead of "**Janitor** run."
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #1925: Add UI to be able to
disable Janitor on the Startup
Posted by GitBox <gi...@apache.org>.
lkishalmi commented on issue #1925: Add UI to be able to disable Janitor on the Startup
URL: https://github.com/apache/netbeans/pull/1925#issuecomment-583508568
Then let's have this merged.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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] AlexFalappa commented on issue #1925: Add UI to be able
to disable Janitor on the Startup
Posted by GitBox <gi...@apache.org>.
AlexFalappa commented on issue #1925: Add UI to be able to disable Janitor on the Startup
URL: https://github.com/apache/netbeans/pull/1925#issuecomment-583458489
Labels are better 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
With regards,
Apache Git Services
---------------------------------------------------------------------
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] AlexFalappa commented on a change in pull request #1925:
Add UI to be able to disable Janitor on the Startup
Posted by GitBox <gi...@apache.org>.
AlexFalappa commented on a change in pull request #1925: Add UI to be able to disable Janitor on the Startup
URL: https://github.com/apache/netbeans/pull/1925#discussion_r375777648
##########
File path: platform/janitor/src/org/netbeans/modules/janitor/JanitorOptionsPanel.java
##########
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.janitor;
+
+import javax.swing.SpinnerNumberModel;
+import org.openide.util.NbBundle;
+import org.openide.util.NbBundle.Messages;
+
+/**
+ *
+ * @author lkishalmi
+ */
+public class JanitorOptionsPanel extends javax.swing.JPanel {
+
+ final SpinnerNumberModel spinnerModel;
+ /**
+ * Creates new form JanitorOptionsPanel
+ */
+ public JanitorOptionsPanel() {
+ initComponents();
+ spinnerModel = new SpinnerNumberModel(Janitor.getUnusedDays(), 0, 5*365, 1);
+ spUnusedDays.setModel(spinnerModel);
+ }
+
+ void loadValues() {
+ cbEnabled.setSelected(Janitor.isEnabled());
+ spinnerModel.setValue(Janitor.getUnusedDays());
+ resetRunNow();
+ }
+
+ void saveValues() {
+ Janitor.setEnabled(cbEnabled.isSelected());
+ Janitor.setUnusedDays(spinnerModel.getNumber().intValue());
+ resetRunNow();
+ }
+
+ boolean isChanged() {
+ boolean changed = false;
+ changed |= cbEnabled.isSelected() != Janitor.isEnabled();
+ changed |= spinnerModel.getNumber().intValue() != Janitor.getUnusedDays();
+ changed |= !btRunNow.isEnabled();
+ return changed;
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ cbEnabled = new javax.swing.JCheckBox();
+ jLabel1 = new javax.swing.JLabel();
+ spUnusedDays = new javax.swing.JSpinner();
+ btRunNow = new javax.swing.JButton();
+ lbRunNowInfo = new javax.swing.JLabel();
+
+ org.openide.awt.Mnemonics.setLocalizedText(cbEnabled, org.openide.util.NbBundle.getMessage(JanitorOptionsPanel.class, "JanitorOptionsPanel.cbEnabled.text")); // NOI18N
+
+ jLabel1.setLabelFor(spUnusedDays);
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(JanitorOptionsPanel.class, "JanitorOptionsPanel.jLabel1.text")); // NOI18N
+
+ org.openide.awt.Mnemonics.setLocalizedText(btRunNow, org.openide.util.NbBundle.getMessage(JanitorOptionsPanel.class, "JanitorOptionsPanel.btRunNow.text")); // NOI18N
+ btRunNow.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btRunNowActionPerformed(evt);
+ }
+ });
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(cbEnabled, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(jLabel1)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(spUnusedDays, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(btRunNow))
+ .addGap(0, 43, Short.MAX_VALUE))))
+ .addGroup(layout.createSequentialGroup()
+ .addGap(12, 12, 12)
+ .addComponent(lbRunNowInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
+ .addContainerGap())
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(cbEnabled)
+ .addGap(18, 18, 18)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel1)
+ .addComponent(spUnusedDays, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(18, 18, 18)
+ .addComponent(btRunNow)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(lbRunNowInfo)
+ .addContainerGap(176, Short.MAX_VALUE))
+ );
+ }// </editor-fold>//GEN-END:initComponents
+
+ @Messages("lbRunNowInfo_Info=Junitor run. Check your Notifications.")
Review comment:
Typo here. Should be "Janitor"
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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] AlexFalappa commented on issue #1925: Add UI to be able
to disable Janitor on the Startup
Posted by GitBox <gi...@apache.org>.
AlexFalappa commented on issue #1925: Add UI to be able to disable Janitor on the Startup
URL: https://github.com/apache/netbeans/pull/1925#issuecomment-582855963
Hi @lkishalmi , just looking at the screenshots I find a bit odd that label ending with **"... #days:"**. As far as I can tell there are no such abbreviations nowhere else in NetBeans.
I suggest having either a "days" label after the combo box or changing the label into something along the lines of "Removal age (number of days):".
There is also a typo in the last label: "**Junitor** run." instead of "**Janitor** run."
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #1925: Add UI to be able to
disable Janitor on the Startup
Posted by GitBox <gi...@apache.org>.
lkishalmi commented on issue #1925: Add UI to be able to disable Janitor on the Startup
URL: https://github.com/apache/netbeans/pull/1925#issuecomment-582941498
@neilcsmith-net @AlexFalappa Thank you for your valuable comments! I'm working on these changes. If you find anything else that makes the wording more human please point that out!
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 #1925: Add UI to be able
to disable Janitor on the Startup
Posted by GitBox <gi...@apache.org>.
lkishalmi merged pull request #1925: Add UI to be able to disable Janitor on the Startup
URL: https://github.com/apache/netbeans/pull/1925
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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