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/05/02 00:20:07 UTC

[GitHub] [netbeans] mgraciano opened a new pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

mgraciano opened a new pull request #2119:
URL: https://github.com/apache/netbeans/pull/2119


   The first PR for the AutoSave module donation. Please, let me know any issue it has to be fixed asap. Thank you in advance.


----------------------------------------------------------------
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] mgraciano commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/ToggleAutoSaveAction.java
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.editor.autosave;
+
+import java.util.prefs.PreferenceChangeListener;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.BooleanStateAction;
+
+@ActionID(id = "org.netbeans.modules.editor.autosave.ToggleAutoSaveAction", category = "Edit")
+@ActionRegistration(displayName = "#CTL_AutoSave", lazy = false)
+@NbBundle.Messages("CTL_AutoSave=Autosave")
+public final class ToggleAutoSaveAction extends BooleanStateAction {
+
+    private final PreferenceChangeListener pcl = evt -> setBooleanState(AutoSaveController.prefs()
+            .getBoolean(AutoSaveController.KEY_ACTIVE, AutoSaveController.KEY_ACTIVE_DEFAULT));
+
+    @Override
+    public String getName() {
+        return NbBundle.getMessage(ToggleAutoSaveAction.class, "CTL_AutoSave");
+    }
+
+    @Override
+    protected void initialize() {
+        super.initialize();
+
+        AutoSaveController.prefs().addPreferenceChangeListener(pcl);
+
+        this.addPropertyChangeListener(evt  -> {
+            if (BooleanStateAction.PROP_BOOLEAN_STATE.equals(evt.getPropertyName())) {
+                AutoSaveController.prefs().putBoolean(AutoSaveController.KEY_ACTIVE, getBooleanState());
+            }
+        });
+        this.setBooleanState(AutoSaveController.prefs().getBoolean(AutoSaveController.KEY_ACTIVE,
+                AutoSaveController.KEY_ACTIVE_DEFAULT));
+    }
+
+    @Override
+    protected String iconResource() {
+        return "org/netbeans/modules/editor/autosave/auto_save.png";

Review comment:
       Done




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > Well, I'd keep this one as a separate module as not all NetBeans based applications necessarily shall support autosave, so they can opt this out by not activating this module. Also keep the tab inside the Editor Options, because that's where it is belong.
   
   Ok. I am working on the other review points and will have a new version by tomorrow. 


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   It was in NetBeans contrib, all of it written by @mgraciano under OCA, so he owns it and can decide what to do with it.


----------------------------------------------------------------
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/i18n/omegat-pt_BR/omegat/project_stats.txt
##########
@@ -0,0 +1,41 @@
+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.
+
+Estatística do projeto
+
+Total:
+	Segmentos	25
+	Palavras	185
+	Caracteres (sem espaços)	1226
+	Caracteres (incluindo espaços)	1368
+Únicos:
+	Segmentos	21
+	Palavras	168
+	Caracteres (sem espaços)	1106
+	Caracteres (incluindo espaços)	1235
+Segmentos únicos restantes:
+	Segmentos	4
+	Palavras	38
+	Caracteres (sem espaços)	257
+	Caracteres (incluindo espaços)	270
+
+Estatística do arquivo individual:
+
+Nome do arquivo	Total de palavras	Palavras restantes para traduzir	Total de caracteres (sem espaços)	Caracteres restantes (sem espaços)	Total de caracteres (incluindo espaços)	Caracteres restantes (incluindo espaços)
+javahelp\org\netbeans\modules\autosave\docs\autosave-about.html	69	7	433	60	494	60
+javahelp\org\netbeans\modules\autosave\docs\autosave-toc.xml	42	31	310	197	329	210
+src\org\netbeans\modules\autosave\Bundle.properties	74	0	483	0	545	0

Review comment:
       Another auto-generated file...




----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/AutoSaveController.java
##########
@@ -0,0 +1,160 @@
+/*
+ * 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.editor.autosave;
+
+import java.beans.PropertyChangeListener;
+import java.io.IOException;
+import java.util.prefs.Preferences;
+import javax.swing.Timer;
+import javax.swing.text.Document;
+import javax.swing.text.JTextComponent;
+import org.netbeans.api.editor.EditorRegistry;
+import org.openide.LifecycleManager;
+import org.openide.cookies.SaveCookie;
+import org.openide.loaders.DataObject;
+import org.openide.modules.OnStart;
+import org.openide.modules.OnStop;
+import org.openide.util.Exceptions;
+import org.openide.util.NbPreferences;
+
+/**
+ *
+ * @author Michel Graciano
+ */
+public final class AutoSaveController {
+
+    public static final String KEY_ACTIVE = "autoSaveActive";
+    public static final String KEY_INTERVAL = "autoSaveInterval";
+    public static final String KEY_SAVE_ON_FOCUS_LOST = "autoSaveOnLostFocus";
+
+    public static final boolean KEY_ACTIVE_DEFAULT = true;

Review comment:
       Well, we won't do an ad campaign on this, however it would get a screenshot and a description on the features page.




----------------------------------------------------------------
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/i18n/omegat-ja/omegat/project_stats.txt
##########
@@ -0,0 +1,41 @@
+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.
+
+Estatística do projeto
+
+Total:
+	Segmentos	19
+	Palavras	185
+	Caracteres (sem espaços)	1242
+	Caracteres (incluindo espaços)	1398
+Únicos:
+	Segmentos	15
+	Palavras	174
+	Caracteres (sem espaços)	1158
+	Caracteres (incluindo espaços)	1307
+Segmentos únicos restantes:
+	Segmentos	2
+	Palavras	43
+	Caracteres (sem espaços)	329
+	Caracteres (incluindo espaços)	360
+
+Estatística do arquivo individual:
+
+Nome do arquivo	Total de palavras	Palavras restantes para traduzir	Total de caracteres (sem espaços)	Caracteres restantes (sem espaços)	Total de caracteres (incluindo espaços)	Caracteres restantes (incluindo espaços)
+javahelp\org\netbeans\modules\autosave\docs\autosave-about.html	69	1	439	13	501	13
+javahelp\org\netbeans\modules\autosave\docs\autosave-toc.xml	42	42	316	316	347	347
+src\org\netbeans\modules\autosave\Bundle.properties	74	0	487	0	550	0

Review comment:
       Again, an autogenerated file; better put a project-level .gitignore that excludes "project_stats.txt", or better, avoid depending on omegat and use internationalization bundles like other NetBeans modules.




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   All the translations were hand made. I did the Portuguese one (I leadered the open source translation effort years ago before Sun cut us off for a paid company) and Japanese was made by a Sun friend in the same time. OmegaT was what we used in the time. If you point me to the right direction I can update and donate the translation too. 


----------------------------------------------------------------
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] ebarboni commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   in the hg.netbeans main/contrib autosave, some commit are done by others (jesse glick as an example)
   I've seen the question mark on the confluence transition page. I just want to be sure we are right 
   


----------------------------------------------------------------
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] eirikbakke edited a comment on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

Posted by GitBox <gi...@apache.org>.
eirikbakke edited a comment on pull request #2119:
URL: https://github.com/apache/netbeans/pull/2119#issuecomment-633114262


   > I leadered the open source translation effort years ago before Sun cut us off for a paid company
   
   Oh--was that the translation effort for all of NetBeans? That's awesome!
   
   Manual translations we would definitively want to preserve.
   
   Comments on the settings UI:
   * In the English translation, perhaps better to use the term "autosave" instead of "save automatically". It's a well-established word for this kind of functionality (and it also takes up less space in the tab).
   * I now discovered that NetBeans has a "reformat on save" option. How does this interact with the autosave function?
   * To save a tab in the Options pane, it might be good to merge the contents of the "On Save" and "Save Automatically" tabs. Just have a single tab called "Saving", and one heading called "Format on Save" and anotherone call "Autosave".
   * How does the "save on focus" feature interact with "save files every X minutes"? If "Save files when focus is lost" is checked, are files _also_ saved every X minutes? Perhaps get rid of the "use save automatically feature" checkbox, instead having one checkbox for "Save files when focus is lost" and one checkbox for "Save files every X minutes".
   


----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Ok, I agreed and integrated most of the suggested changes (most of listeners were unnecessary and were removed.
   
   There is only one point I would like to discuss yet, it is the menu and toolbar option. Since I refactored the Options UI, the save on lost focus option is not anymore a chilld option for autosave at all, so only one option at menu/toolbar makes no sanse to me anymore, where I have 2 options:
   . Remove the menu/toolbar action at all;
   . Change the Options to what it was originally.
   
   Both changes are quick and I will be glad to do as we decide.


----------------------------------------------------------------
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/i18n/omegat-autosave/omegat/project_stats.txt
##########
@@ -0,0 +1,40 @@
+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.
+
+Estatística do projeto
+
+Total:
+	Segmentos	21
+	Palavras	143
+	Caracteres (sem espaços)	925
+	Caracteres (incluindo espaços)	1049
+Únicos:
+	Segmentos	16
+	Palavras	124
+	Caracteres (sem espaços)	785
+	Caracteres (incluindo espaços)	895
+Segmentos únicos restantes:
+	Segmentos	16
+	Palavras	143
+	Caracteres (sem espaços)	925
+	Caracteres (incluindo espaços)	1049
+
+Estatística do arquivo individual:
+
+Nome do arquivo	Total de palavras	Palavras restantes para traduzir	Total de caracteres (sem espaços)	Caracteres restantes (sem espaços)	Total de caracteres (incluindo espaços)	Caracteres restantes (incluindo espaços)
+javahelp\org\netbeans\modules\autosave\docs\autosave-about.html	69	69	439	439	501	501
+src\org\netbeans\modules\autosave\Bundle.properties	74	74	486	486	548	548

Review comment:
       Auto-generated files should not be committed, but instead added to a .gitinore.




----------------------------------------------------------------
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] eirikbakke edited a comment on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

Posted by GitBox <gi...@apache.org>.
eirikbakke edited a comment on pull request #2119:
URL: https://github.com/apache/netbeans/pull/2119#issuecomment-633114262


   > I leadered the open source translation effort years ago before Sun cut us off for a paid company
   
   Oh--was that the translation effort for all of NetBeans? That's awesome!
   
   Manual translations we would definitively want to preserve.
   
   Comments on the settings UI:
   * In the English translation, perhaps better to use the term "autosave" instead of "save automatically". It's a well-established word for this kind of functionality (and it also takes up less space in the tab).
   * I now discovered that NetBeans has a "reformat on save" option. How does this interact with the autosave function?
   * To save a tab in the Options dialog, it might be good to merge the contents of the "On Save" and "Save Automatically" tabs. Just have a single tab called "Saving", and one heading called "Format on Save" and another one called "Autosave".
   * How does the "save on focus" feature interact with "save files every X minutes"? If "Save files when focus is lost" is checked, are files _also_ saved every X minutes? Perhaps get rid of the "use save automatically feature" checkbox, instead having one checkbox for "Save files when focus is lost" and one checkbox for "Save files every X minutes".
   


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/AutoSaveController.java
##########
@@ -0,0 +1,160 @@
+/*
+ * 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.editor.autosave;
+
+import java.beans.PropertyChangeListener;
+import java.io.IOException;
+import java.util.prefs.Preferences;
+import javax.swing.Timer;
+import javax.swing.text.Document;
+import javax.swing.text.JTextComponent;
+import org.netbeans.api.editor.EditorRegistry;
+import org.openide.LifecycleManager;
+import org.openide.cookies.SaveCookie;
+import org.openide.loaders.DataObject;
+import org.openide.modules.OnStart;
+import org.openide.modules.OnStop;
+import org.openide.util.Exceptions;
+import org.openide.util.NbPreferences;
+
+/**
+ *
+ * @author Michel Graciano
+ */
+public final class AutoSaveController {
+
+    public static final String KEY_ACTIVE = "autoSaveActive";
+    public static final String KEY_INTERVAL = "autoSaveInterval";
+    public static final String KEY_SAVE_ON_FOCUS_LOST = "autoSaveOnLostFocus";
+
+    public static final boolean KEY_ACTIVE_DEFAULT = true;

Review comment:
       Shall this be a constant? Anyway it is probably shall be false at first.
   Remember people not using this module any more as they wished to use it. It is loaded by default.
   We can enable autosave to be turned on  by default after circulating this function with the IDE for a while.Also probably autosave on focus lost should be enabled by default then instead of the timed save.




----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Owner is @mgraciano. 


----------------------------------------------------------------
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/i18n/omegat-ja/source/javahelp/org/netbeans/modules/autosave/docs/autosave-about.html
##########
@@ -0,0 +1,38 @@
+<!--
+
+  -- 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.
+
+-->
+<html>
+    <head>
+        <title>About AutoSave Module</title>
+        <link rel="stylesheet" href="nbdocs:/org/netbeans/modules/usersguide/ide.css" type="text/css">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+    <body>
+        <h2>About AutoSave Module</h2>
+         <p>
+            This module provides the functionality to automatically save all yours unsaved opened files.

Review comment:
       This string is repeated 11 times in this commit--are these generated files? Each internationalized string like this should only occur in one place.




----------------------------------------------------------------
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] eirikbakke edited a comment on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

Posted by GitBox <gi...@apache.org>.
eirikbakke edited a comment on pull request #2119:
URL: https://github.com/apache/netbeans/pull/2119#issuecomment-629856344


   Thank you for this!
   
   Main concerns:
   1) Is it really necessary to use a module installer? If so, it should not run unless the functionality is actually enabled (is this the case?).
   2) There are various listeners attached to global objects (Preferences, at least), which can lead to memory leaks. There are some (I think) incorrect attempts to use weak listeners. This would need to be reworked, ideally by removing listeners explicitly, at the right time, rather than relying on weak listeners. Weak listeners can be used, but then it needs to be very clear when the objects are really going to be garbage collected, and why they won't be garbage collected immediately.
   3) This patch uses an internationalization library (omegat) that is not standard in the NetBeans codebase. It would be preferable to do internationalization in the same way as other modules.
   4) This is a very big patch for relatively simple functionality; I think a lot of auto-generated files were included. Those should be removed and put in a .gitignore. (Or maybe they will go away if suggestion (3) is implemented.)
   
   Also, would you be able to post a screenshot of the AutoSavePanel in the settings pane? Makes it easier to review the UI without building the patch ourselves.


----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   I am sorry for the long delay. Hope everyone is ok in crazy days.
   
   > > Should I do this just in the dialog or the File > Save Automatically menu item too?
   > 
   > I hadn't noticed that menu item. I don't think it should be there--if every option got its own menu item, the menus would get very long. Just having the settings in the options dialog is good enough. (But regardless, yes, I would always use the word "Autosave" instead of "Save Automatically".)
   > 
   > (So, to your later question, yes, I would suggest removing the menu and toolbar action. But you could still keep the code for it, if you want--just remove the action registration. That way, the user can still drop it in a customized toolbar if they want, or we can use it later if we change our mind.)
   
   Great idea! I have just pushed this changed.
   
   > 
   > > To merge the two tabs, probably I will need to merge both modules. Is it desirable?
   > 
   > I see--perhaps not. I'd go with lkishalmi's opinion here.
   
   Agreed too. It can be reviews int he future, not a big deal.
   
   
   I have a little question. After we push it to the default distro, I wish to build it in a standalone way and include in the 11.X update center. Where can a I find any documentation how to proceed? More specifically to the Plugin Portal.


----------------------------------------------------------------
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] mgraciano commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/command/AutoSaveCommand.java
##########
@@ -0,0 +1,33 @@
+/*
+ * 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.editor.autosave.command;
+
+import org.openide.actions.SaveAllAction;
+import org.openide.util.actions.SystemAction;
+
+/**
+ *
+ * @author Michel Graciano
+ */
+class AutoSaveCommand {

Review comment:
       Agreed.




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > You also need to add this module to the build chain in nbbuild/cluster.properties also as a dependency to ide/editor.kit .
   
   Done


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Approved the changes, however I think modifying the editor.kit dependencies is not required since the module is eager loaded. It will be automatically loaded if present. I've just tested it.
   @JaroslavTulach could you confirm that?


----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   The other reviews I will do this weekend. Do you have any point how to load the module correctly? 


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/AutoSavePanel.form
##########
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+

Review comment:
       License header is missing.




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > * In the English translation, perhaps better to use the term "autosave" instead of "save automatically". It's a well-established word for this kind of functionality (and it also takes up less space in the tab).
   
   Is it what you mean?
   
   ![image](https://user-images.githubusercontent.com/348661/82738682-db726900-9d0f-11ea-9c82-daff64b7f3f2.png)
   
   
   ![image](https://user-images.githubusercontent.com/348661/82738669-c0075e00-9d0f-11ea-8822-dac194778712.png)
   


----------------------------------------------------------------
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] eirikbakke commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > I leadered the open source translation effort years ago before Sun cut us off for a paid company
   Oh--was that the translation effort for all of NetBeans? That's awesome!
   
   Yes, manual translations we would definitively want to preserve.
   
   Comments on the settings UI:
   * In the English translation, perhaps better to use the term "autosave" instead of "save automatically". It's a well-established word for this kind of functionality (and it also takes up less space in the tab).
   * I now discovered that NetBeans has a "reformat on save" option. How does this interact with the autosave function?
   * To save a tab in the Options pane, it might be good to merge the contents of the "On Save" and "Save Automatically" tabs. Just have a single tab called "Saving", and one heading called "Format on Save" and anotherone call "Autosave".
   * How does the "save on focus" feature interact with "save files every X minutes"? If "Save files when focus is lost" is checked, are files _also_ saved every X minutes? Perhaps get rid of the "use save automatically feature" checkbox, instead having one checkbox for "Save files when focus is lost" and one checkbox for "Save files every X minutes".
   


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Well, millisecond precision is a no-no. Even seconds shall have a lower limit of 10 maybe 5 seconds as it could cause bad things on Compile on Save / Deploy on Save.


----------------------------------------------------------------
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] eirikbakke commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > I will remove all the OmegaT files and keep the generated properties files. What do you think? I am considering to remove all the help files too since it is not used anymore. It will reduce the diff a lot.
   
   I think that would make sense, in my opinion.
   
   > Should I do this just in the dialog or the File > Save Automatically menu item too?
   
   I hadn't noticed that menu item. I don't think it should be there--if every option got its own menu item, the menus would get very long. Just having the settings in the options dialog is good enough. (But regardless, yes, I would always use the word "Autosave" instead of "Save Automatically".)
   
   (So, to your later question, yes, I would suggest removing the menu and toolbar action. But you could still keep the code for it, if you want--just remove the action registration. That way, the user can still drop it in a customized toolbar if they want, or we can use it later if we change our mind.)
   
   > To merge the two tabs, probably I will need to merge both modules. Is it desirable?
   
   I see--perhaps not. I'd go with lkishalmi's opinion here.
   


----------------------------------------------------------------
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] mgraciano commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/AutoSaveController.java
##########
@@ -0,0 +1,160 @@
+/*
+ * 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.editor.autosave;
+
+import java.beans.PropertyChangeListener;
+import java.io.IOException;
+import java.util.prefs.Preferences;
+import javax.swing.Timer;
+import javax.swing.text.Document;
+import javax.swing.text.JTextComponent;
+import org.netbeans.api.editor.EditorRegistry;
+import org.openide.LifecycleManager;
+import org.openide.cookies.SaveCookie;
+import org.openide.loaders.DataObject;
+import org.openide.modules.OnStart;
+import org.openide.modules.OnStop;
+import org.openide.util.Exceptions;
+import org.openide.util.NbPreferences;
+
+/**
+ *
+ * @author Michel Graciano
+ */
+public final class AutoSaveController {
+
+    public static final String KEY_ACTIVE = "autoSaveActive";
+    public static final String KEY_INTERVAL = "autoSaveInterval";
+    public static final String KEY_SAVE_ON_FOCUS_LOST = "autoSaveOnLostFocus";
+
+    public static final boolean KEY_ACTIVE_DEFAULT = true;

Review comment:
       Disabled this feature by default in the latest push. 




----------------------------------------------------------------
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] ebarboni commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Hi, we should go through ip clearance I guess. 
   Who is owner of codebase ? Where was the previous source ?


----------------------------------------------------------------
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] mgraciano commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/AutoSaveController.java
##########
@@ -0,0 +1,160 @@
+/*
+ * 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.editor.autosave;
+
+import java.beans.PropertyChangeListener;
+import java.io.IOException;
+import java.util.prefs.Preferences;
+import javax.swing.Timer;
+import javax.swing.text.Document;
+import javax.swing.text.JTextComponent;
+import org.netbeans.api.editor.EditorRegistry;
+import org.openide.LifecycleManager;
+import org.openide.cookies.SaveCookie;
+import org.openide.loaders.DataObject;
+import org.openide.modules.OnStart;
+import org.openide.modules.OnStop;
+import org.openide.util.Exceptions;
+import org.openide.util.NbPreferences;
+
+/**
+ *
+ * @author Michel Graciano
+ */
+public final class AutoSaveController {
+
+    public static final String KEY_ACTIVE = "autoSaveActive";
+    public static final String KEY_INTERVAL = "autoSaveInterval";
+    public static final String KEY_SAVE_ON_FOCUS_LOST = "autoSaveOnLostFocus";
+
+    public static final boolean KEY_ACTIVE_DEFAULT = true;

Review comment:
       Will we promote this new feature in the release? If so, I agree with you that it could be disabled by default, since users will know that there is this new feature. If not, maybe it is for the best to keep it enabled by default since it is like a feature to prevent people to lose unsaved work.
   
   I have no objections with what you requested. I will disable both options by default and push it soon.




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > I only had a quick look at this, but this is my reply: The code looks ok to merge, as long as the statements are true. The license header says, that the code is licensed to the ASF under contributor agreement, that means that @mgraciano needs to be in a position to do this, i.e. @mgraciano needs to be the sole author or contributions were so minimal, that they don't form a copyright on their own. If that is the case all is good, if not, the offending parts need to be removed.
   > 
   > I saw at least one binary (auto_save.png) for which license information is missing. Please add a `licenseinfo.xml` file to add that info (for an example see `ide/db.dataview/licenseinfo.xml` and https://cwiki.apache.org/confluence/display/NETBEANS/Legal+FAQ#LegalFAQ-licenseinfoPerfileinfo-licenseinfo.xml)
   > 
   > For the code itself: While unifying the translations is important, I would not see it as a breaking problem, as it can be fixed after integration.
   
   After the integration I can continue to do the fixes as necessary, even the translation.
   I intend to create some testes too in the future.


----------------------------------------------------------------
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] mgraciano edited a comment on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

Posted by GitBox <gi...@apache.org>.
mgraciano edited a comment on pull request #2119:
URL: https://github.com/apache/netbeans/pull/2119#issuecomment-622958889


   > Right now we do not have JavaHelp any more. To be honest I do not know how to handle that situation.
   
   Any idea if should I just remove everything related to JavaHelp or keep that?
   


----------------------------------------------------------------
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] ebarboni commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   no previous source reachable ?


----------------------------------------------------------------
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] mgraciano commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/nbproject/project.properties
##########
@@ -0,0 +1,21 @@
+# 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.
+

Review comment:
       Done.




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > Well, millisecond precision is a no-no. Even seconds shall have a lower limit of 10 maybe 5 seconds as it could cause bad things on Compile on Save / Deploy on Save.
   
   My question is, should I change it now or we can proceed with this donation as it is? I am afraid exhaustive testing should be done on it what could keep this even longer.


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Yes, we are. If the code is written by someone outside Oracle or Sun (regardless of who may have tweaked it later) and it is under OCA, the writer of the code can take it and do with it what they like.


----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   I was thinking two options for what you asked:
   1. Move the options back do Miscellaneous and treat this feature out of Editor umbrella (This could be a feature for platform applications too, since 'save' operations are not specifically tied to source editor;
   2. Change the patch drastically and move the option to org.netbeans.modules.options.editor. Here included the file where the properties are persisted as well;
   
   What would be the desirable thing to do?


----------------------------------------------------------------
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/i18n/omegat-autosave/omegat.project
##########
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+    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.
+
+-->
+<omegat>
+  <project version="1.0">
+    <source_dir>__DEFAULT__</source_dir>
+    <target_dir>__DEFAULT__</target_dir>
+    <tm_dir>__DEFAULT__</tm_dir>
+    <glossary_dir>__DEFAULT__</glossary_dir>
+    <source_lang>EN-US</source_lang>
+    <target_lang>PT-BR</target_lang>
+    <sentence_seg>true</sentence_seg>
+  </project>

Review comment:
       This module seems to use a different internationalization system than the rest of the IDE. It would be better to use the standard NetBeans libraries for this.




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > If you want to save every 5 minute, just multiply it by 60.
   > 
   > I find the font weight affects the width of editor tab, when the file is dirty, the tab width becomes longer. And once the file is saved, the tab will restore its original length. This change may distract attention. Was it possible to keep the editor tab width unchanged?
   
   @humphreygao could you file a issue requestion it 
   
   > If you want to save every 5 minute, just multiply it by 60.
   > 
   > I find the font weight affects the width of editor tab, when the file is dirty, the tab width becomes longer. And once the file is saved, the tab will restore its original length. This change may distract attention. Was it possible to keep the editor tab width unchanged?
   
   Hello. AFAIK there is not such option. I think it is unrelated to this donation and option. I just create a issue requesting this https://issues.apache.org/jira/browse/NETBEANS-4488. Please, add your thoughts there.


----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > > I leadered the open source translation effort years ago before Sun cut us off for a paid company
   > 
   > Oh--was that the translation effort for all of NetBeans? That's awesome!
   > 
   > Manual translations we would definitively want to preserve.
   
   I will remove all the OmegaT files and keep the generated properties files. What do you think? I am considering to remove all the help files too since it is not used anymore. It will reduce the diff a lot.
   
   > 
   > Comments on the settings UI:
   > 
   > * In the English translation, perhaps better to use the term "autosave" instead of "save automatically". It's a well-established word for this kind of functionality (and it also takes up less space in the tab).
   
   Should I do this just in the dialog or the File > Save Automatically menu item too?
   
   > * I now discovered that NetBeans has a "reformat on save" option. How does this interact with the autosave function?
   
   As far as I can tell, it works nicely, since this module just call the already existent save actions, or the save cookie in it document for focus lost or save all action.
   
   > * To save a tab in the Options dialog, it might be good to merge the contents of the "On Save" and "Save Automatically" tabs. Just have a single tab called "Saving", and one heading called "Format on Save" and another one called "Autosave".
   
   To merge the two tabs, probably I will need to merge both modules. Is it desirable? If so, I can do this without a problem.
   
   > * How does the "save on focus" feature interact with "save files every X minutes"? If "Save files when focus is lost" is checked, are files _also_ saved every X minutes? Perhaps get rid of the "use save automatically feature" checkbox, instead having one checkbox for "Save files when focus is lost" and one checkbox for "Save files every X minutes".
   
   Both actions are designed to be independent. If both are checked the save operation will be invoked for the event that happens first. Do you mean the UI to be something like this?
   
   ![image](https://user-images.githubusercontent.com/348661/82738533-94d03f00-9d0e-11ea-933a-5a0ebda2d0ed.png)
   
   


----------------------------------------------------------------
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/Installer.java
##########
@@ -0,0 +1,40 @@
+/*
+ * 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.editor.autosave;
+
+import java.lang.ref.WeakReference;
+import java.util.prefs.PreferenceChangeListener;
+import org.netbeans.modules.editor.autosave.command.AutoSaveController;
+import org.openide.modules.ModuleInstall;
+
+public class Installer extends ModuleInstall {

Review comment:
       Is this module loaded (and this installer run) only when the autosave functionality is actually enabled?




----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/licenseinfo.xml
##########
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<licenseinfo>
+    <fileset>
+        <file>src/org/netbeans/modules/editor/autosave/auto_save.png</file>
+        <file>src/org/netbeans/modules/editor/autosave/auto_save24.png</file>

Review comment:
       I have not seen this auto_save24.png used. If it is not used, It should be removed.

##########
File path: ide/editor.autosave/nbproject/project.properties
##########
@@ -0,0 +1,21 @@
+# 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.
+
+javac.compilerargs=-Xlint -Xlint:-serial
+javac.source=1.8
+javadoc.title=Editor Autosave
+javahelp.hs=autosave-hs.xml

Review comment:
       Also is this needed?

##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/ToggleAutoSaveAction.java
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.editor.autosave;
+
+import java.util.prefs.PreferenceChangeListener;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.BooleanStateAction;
+
+@ActionID(id = "org.netbeans.modules.editor.autosave.ToggleAutoSaveAction", category = "Edit")
+@ActionRegistration(displayName = "#CTL_AutoSave", lazy = false)
+@NbBundle.Messages("CTL_AutoSave=Autosave")
+public final class ToggleAutoSaveAction extends BooleanStateAction {
+
+    private final PreferenceChangeListener pcl = evt -> setBooleanState(AutoSaveController.prefs()
+            .getBoolean(AutoSaveController.KEY_ACTIVE, AutoSaveController.KEY_ACTIVE_DEFAULT));
+
+    @Override
+    public String getName() {
+        return NbBundle.getMessage(ToggleAutoSaveAction.class, "CTL_AutoSave");
+    }
+
+    @Override
+    protected void initialize() {
+        super.initialize();
+
+        AutoSaveController.prefs().addPreferenceChangeListener(pcl);
+
+        this.addPropertyChangeListener(evt  -> {
+            if (BooleanStateAction.PROP_BOOLEAN_STATE.equals(evt.getPropertyName())) {
+                AutoSaveController.prefs().putBoolean(AutoSaveController.KEY_ACTIVE, getBooleanState());
+            }
+        });
+        this.setBooleanState(AutoSaveController.prefs().getBoolean(AutoSaveController.KEY_ACTIVE,
+                AutoSaveController.KEY_ACTIVE_DEFAULT));
+    }
+
+    @Override
+    protected String iconResource() {
+        return "org/netbeans/modules/editor/autosave/auto_save.png";

Review comment:
       Shall be declared as a static final constant with //NOI18N at the end.
   Also it could be annotated with @StaticResource

##########
File path: ide/editor.autosave/manifest.mf
##########
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+OpenIDE-Module: org.netbeans.modules.editor.autosave/1
+OpenIDE-Module-Install: org/netbeans/modules/editor/autosave/Installer.class
+OpenIDE-Module-Layer: org/netbeans/modules/editor/autosave/layer.xml
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/autosave/Bundle.properties
+OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help

Review comment:
       Is this still required?

##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/Installer.java
##########
@@ -0,0 +1,40 @@
+/*
+ * 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.editor.autosave;
+
+import java.lang.ref.WeakReference;
+import java.util.prefs.PreferenceChangeListener;
+import org.netbeans.modules.editor.autosave.command.AutoSaveController;
+import org.openide.modules.ModuleInstall;
+
+public class Installer extends ModuleInstall {

Review comment:
       Also instead of the Installer http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/package-summary.html see OnStart and OnStop annotation which could be added to two public static Runnable inner classes in AutoSave controller.

##########
File path: ide/editor.autosave/manifest.mf
##########
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+OpenIDE-Module: org.netbeans.modules.editor.autosave/1
+OpenIDE-Module-Install: org/netbeans/modules/editor/autosave/Installer.class
+OpenIDE-Module-Layer: org/netbeans/modules/editor/autosave/layer.xml

Review comment:
       I hope the layer and the installer can be removed.

##########
File path: ide/editor.autosave/nbproject/project.properties
##########
@@ -0,0 +1,21 @@
+# 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.
+

Review comment:
       I think is.eager=true would be recommended here.
   Otherwise it would be a normal module which requires to be enabled by the user.
   

##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/layer.xml
##########
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>

Review comment:
       If the layer file become empty, let's get rid of it.




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > Yes, we are. If the code is written by someone outside Oracle or Sun (regardless of who may have tweaked it later) and it is under OCA, the writer of the code can take it and do with it what they like.
   
   Yes, I wrote it in the past and Jesse did some fixes after some NB APIs chances, just to keep it working. Actually It is a honor to contribute it directly to the main distro.


----------------------------------------------------------------
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] mgraciano commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/AutoSavePanel.form
##########
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+

Review comment:
       I have included the license as requested.




----------------------------------------------------------------
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] humphreygao commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   If you want to save every 5 minute, just multiply it by 60. 
   
   I find the font weight affects the width of editor tab, when the file is dirty, the tab width becomes longer. And once the file is saved, the tab will restore its original length. This change may distract attention. Was it possible to keep the editor tab width unchanged? 


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Finally merged as this one is probably the most discussed PR in NetBeans history...
   


----------------------------------------------------------------
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/Installer.java
##########
@@ -0,0 +1,40 @@
+/*
+ * 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.editor.autosave;
+
+import java.lang.ref.WeakReference;
+import java.util.prefs.PreferenceChangeListener;
+import org.netbeans.modules.editor.autosave.command.AutoSaveController;
+import org.openide.modules.ModuleInstall;
+
+public class Installer extends ModuleInstall {
+
+    @Override
+    public void restored() {
+        AutoSaveController.getInstance().synchronize();
+        AutoSaveController.prefs().
+                addPreferenceChangeListener(new WeakReference<PreferenceChangeListener>(evt ->

Review comment:
       Is this the right way to add a weak listener? Shouldn't we use WeakListener interface? Or wouldn't it be better to explicitly remove the listener when the module is removed?




----------------------------------------------------------------
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] eirikbakke commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Thank you for this!
   
   Main concerns:
   1) Is it really necessary to use a module installer? If so, it should not run unless the functionality is actually enabled (is this the case?).
   2) There are various listeners attached to global objects (Preferences, at least), which can lead to memory leaks. There are some (I think) incorrect attempts to use weak listeners. This would need to be reworked, ideally by removing listeners explicitly, at the right time, rather than relying on weak listeners. Weak listeners can be used, but then it needs to be very clear when the objects are really going to be garbage collected, and why they won't be garbage collected ideally.
   3) This patch uses an internationalization library (omegat) that is not standard in the NetBeans codebase. It would be preferable to do internationalization in the same way as other modules.
   4) This is a very big patch for relatively simple functionality; I think a lot of auto-generated files were included. Those should be removed and put in a .gitignore. (Or maybe they will go away if suggestion (3) is implemented.)
   
   Also, would you be able to post a screenshot of the AutoSavePanel in the settings pane? Makes it easier to review the UI without building the patch ourselves.


----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   I have published a fork of this plugin to Plugin Portal and a user asked to change the time precision from minutes do milliseconds or seconds. VS Code has a ms precision. I personally think it is too much, but seconds could be feasible. I will probably test it there, but since we have not integrated it yet to main base, what do you think of this?
   
   I did some tests and found no objections to this request in seconds precision, but I haven't tested it with features like 'Compile on Save' and 'Deploy on Save'.


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/command/AutoSaveCommand.java
##########
@@ -0,0 +1,33 @@
+/*
+ * 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.editor.autosave.command;
+
+import org.openide.actions.SaveAllAction;
+import org.openide.util.actions.SystemAction;
+
+/**
+ *
+ * @author Michel Graciano
+ */
+class AutoSaveCommand {

Review comment:
       Just a question org.openide.LifecycleManager.getDefault().saveAll() might make this class obsolete.




----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > @lkishalmi If we do the donation before fixing review issues, then it should probably be done into a separate branch.
   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:
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/i18n/omegat-autosave/source/javahelp/org/netbeans/modules/autosave/docs/autosave-about.html
##########
@@ -0,0 +1,38 @@
+<!--
+
+  -- 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.

Review comment:
       Some extra dashes here that's not usually in the license header.




----------------------------------------------------------------
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] eirikbakke commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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






----------------------------------------------------------------
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/Installer.java
##########
@@ -0,0 +1,40 @@
+/*
+ * 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.editor.autosave;
+
+import java.lang.ref.WeakReference;
+import java.util.prefs.PreferenceChangeListener;
+import org.netbeans.modules.editor.autosave.command.AutoSaveController;
+import org.openide.modules.ModuleInstall;
+
+public class Installer extends ModuleInstall {

Review comment:
       Is this module loaded only when the autosave functionality is actually enabled?




----------------------------------------------------------------
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] ebarboni edited a comment on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

Posted by GitBox <gi...@apache.org>.
ebarboni edited a comment on pull request #2119:
URL: https://github.com/apache/netbeans/pull/2119#issuecomment-623328910


   no previous source reachable ? if no maybe consider this as contribution, not donation


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Well the NBM will be built in 12.1 might be just added to the 12.0 update center, or an other UC. But that's sure you will be able to download it separately.


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Well, I agree with @eirikbakke on every point, though as of the donation even the translated files have some value. So generally I'd prefer to take over the donated code, then start to shape it for the common forms. I think @matthiasblaesing wisdom would be welcome here.


----------------------------------------------------------------
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] mgraciano commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/licenseinfo.xml
##########
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<licenseinfo>
+    <fileset>
+        <file>src/org/netbeans/modules/editor/autosave/auto_save.png</file>
+        <file>src/org/netbeans/modules/editor/autosave/auto_save24.png</file>

Review comment:
       It was included in this commit: https://github.com/apache/netbeans/pull/2119/commits/392b3eca974c5ad9f79d601eee75e7900c2a1b08




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > Right now we do not have JavaHelp any more. To be honest I do not know how to handle that situation.
   
   Any isdea if should I just remove everything related to JavaHelp or keep that?
   


----------------------------------------------------------------
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] mgraciano commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/manifest.mf
##########
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+OpenIDE-Module: org.netbeans.modules.editor.autosave/1
+OpenIDE-Module-Install: org/netbeans/modules/editor/autosave/Installer.class
+OpenIDE-Module-Layer: org/netbeans/modules/editor/autosave/layer.xml
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/autosave/Bundle.properties
+OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help

Review comment:
       Not really. Removed.




----------------------------------------------------------------
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] mgraciano commented on pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   > Also, would you be able to post a screenshot of the AutoSavePanel in the settings pane? Makes it easier to review the UI without building the patch ourselves.
   
   Sure:
   ![image](https://user-images.githubusercontent.com/348661/82736372-ad852880-9cff-11ea-9dc7-0e8a2fd94e4d.png)
   


----------------------------------------------------------------
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 #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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


   Well, I'd keep this one as a separate module as not all NetBeans based applications necessarily shall support autosave, so they can opt this out by not activating this module. Also keep the tab inside the Editor Options, because that's where it is belong. 


----------------------------------------------------------------
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] eirikbakke commented on a change in pull request #2119: [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

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



##########
File path: ide/editor.autosave/src/org/netbeans/modules/editor/autosave/AutoSavePanel.java
##########
@@ -0,0 +1,148 @@
+/*
+ * 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.editor.autosave;
+
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.lang.ref.WeakReference;
+import java.util.prefs.PreferenceChangeEvent;
+import java.util.prefs.PreferenceChangeListener;
+import javax.swing.BorderFactory;
+import javax.swing.GroupLayout;
+import javax.swing.GroupLayout.Alignment;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JSpinner;
+import javax.swing.LayoutStyle.ComponentPlacement;
+import javax.swing.SpinnerNumberModel;
+import org.netbeans.modules.editor.autosave.command.AutoSaveController;
+import org.openide.awt.Mnemonics;
+import org.openide.util.NbBundle;
+
+final class AutoSavePanel extends javax.swing.JPanel {
+
+    AutoSavePanel(final AutoSaveOptionsPanelController controller) {
+        spnModel = new SpinnerNumberModel(10, 0, 999, 1);
+
+        initComponents();
+
+        AutoSaveController.prefs().
+                addPreferenceChangeListener(new WeakReference<PreferenceChangeListener>(evt -> {

Review comment:
       Wait... this just creates a WeakReference instance wrapping the listener, gets the listener, and then immediately throws away the WeakReference?




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