You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by lk...@apache.org on 2018/11/24 18:22:05 UTC

[incubator-netbeans] branch release100 updated (cff9772 -> 6242f29)

This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a change to branch release100
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git.


    from cff9772  Update version number to 10.0
     new d381cdd  Ask before downloading nbjavac and co. when opening an existing project
     new 6242f29  Provide localized error description

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../modules/ide/ergonomics/fod/Bundle.properties   |  1 +
 .../ide/ergonomics/fod/FeatureProjectFactory.java  |  2 --
 .../ide/ergonomics/fod/ModulesInstaller.java       | 40 +++++++---------------
 3 files changed, 13 insertions(+), 30 deletions(-)


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

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


[incubator-netbeans] 02/02: Provide localized error description

Posted by lk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch release100
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git

commit 6242f29127475f4b0189a741bdaa0ecbec01b7cb
Author: Jaroslav Tulach <ja...@oracle.com>
AuthorDate: Sat Nov 24 05:07:15 2018 +0100

    Provide localized error description
---
 .../netbeans/modules/ide/ergonomics/fod/Bundle.properties |  1 +
 .../modules/ide/ergonomics/fod/FeatureProjectFactory.java |  2 --
 .../modules/ide/ergonomics/fod/ModulesInstaller.java      | 15 ++++++++++-----
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/Bundle.properties b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/Bundle.properties
index 321fdea..e9f1960 100644
--- a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/Bundle.properties
+++ b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/Bundle.properties
@@ -26,6 +26,7 @@ InstallerMissingModules_Install=Installing...
 InstallerMissingModules_TryAgainButton=&Try Again
 InstallerMissingModules_ErrorPanel_Title=Error
 InstallerMissingModules_ErrorPanel=Installation cannot be completed due to {0} \n {1}
+InstallerMissingModules_Cancelled=Install additional modules: {0}
 InstallerMissingModules_NeedsRestart=Restart IDE to complete instaling asked plugins.
 
 DebuggerConfigurationPanel.downloadButton.text=Download
diff --git a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java
index f4cb616..60caaa8 100644
--- a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java
+++ b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java
@@ -31,7 +31,6 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.Callable;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.swing.Icon;
@@ -66,7 +65,6 @@ import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import org.netbeans.api.project.ui.OpenProjects;
 import org.netbeans.spi.project.ui.LogicalViewProvider;
-import org.netbeans.spi.project.ui.ProjectConvertor;
 import org.openide.filesystems.FileUtil;
 import org.openide.loaders.DataFolder;
 import org.openide.nodes.FilterNode;
diff --git a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ModulesInstaller.java b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ModulesInstaller.java
index 827292f..6364404 100644
--- a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ModulesInstaller.java
+++ b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ModulesInstaller.java
@@ -31,14 +31,10 @@ import javax.swing.JComponent;
 import javax.swing.JTextArea;
 import javax.swing.SwingUtilities;
 import org.netbeans.api.autoupdate.InstallSupport;
-import org.netbeans.api.autoupdate.InstallSupport.Installer;
-import org.netbeans.api.autoupdate.InstallSupport.Validator;
 import org.netbeans.api.autoupdate.OperationContainer;
 import org.netbeans.api.autoupdate.OperationException;
-import org.netbeans.api.autoupdate.OperationSupport.Restarter;
 import org.netbeans.api.autoupdate.UpdateElement;
 import org.netbeans.api.progress.ProgressHandle;
-import org.netbeans.api.progress.ProgressHandleFactory;
 import org.netbeans.modules.autoupdate.ui.api.PluginManager;
 import org.openide.DialogDisplayer;
 import org.openide.NotifyDescriptor;
@@ -210,7 +206,16 @@ public class ModulesInstaller {
         }
         boolean ok = PluginManager.openInstallWizard(installContainer);
         if (!ok) {
-            progressMonitor.onError("cancel"); // NOI18N
+            StringBuilder sb = new StringBuilder();
+            String sep = "";
+            for (UpdateElement el : modules4install) {
+                sb.append(sep);
+                sb.append(el.getDisplayName());
+                sep = ", ";
+            }
+            progressMonitor.onError(
+                getBundle("InstallerMissingModules_Cancelled", sb) // NOI18N
+            );
         }
     }
     


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

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


[incubator-netbeans] 01/02: Ask before downloading nbjavac and co. when opening an existing project

Posted by lk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch release100
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git

commit d381cdd03a05e7e25d766b518ab6894cdf49c05b
Author: Jaroslav Tulach <ja...@oracle.com>
AuthorDate: Sat Nov 24 04:39:20 2018 +0100

    Ask before downloading nbjavac and co. when opening an existing project
---
 .../ide/ergonomics/fod/ModulesInstaller.java       | 29 +++-------------------
 1 file changed, 4 insertions(+), 25 deletions(-)

diff --git a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ModulesInstaller.java b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ModulesInstaller.java
index 691bc66..827292f 100644
--- a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ModulesInstaller.java
+++ b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ModulesInstaller.java
@@ -39,6 +39,7 @@ import org.netbeans.api.autoupdate.OperationSupport.Restarter;
 import org.netbeans.api.autoupdate.UpdateElement;
 import org.netbeans.api.progress.ProgressHandle;
 import org.netbeans.api.progress.ProgressHandleFactory;
+import org.netbeans.modules.autoupdate.ui.api.PluginManager;
 import org.openide.DialogDisplayer;
 import org.openide.NotifyDescriptor;
 import org.openide.awt.Mnemonics;
@@ -207,32 +208,10 @@ public class ModulesInstaller {
         if (! installContainer.listInvalid ().isEmpty ()) {
             throw new IllegalArgumentException ("Some are invalid for install: " + installContainer.listInvalid ());
         }
-        InstallSupport installSupport = installContainer.getSupport ();
-        if (downloadHandle == null) {
-            downloadHandle = ProgressHandleFactory.createHandle (
-                getBundle ("InstallerMissingModules_Download",
-                presentUpdateElements (finder.getVisibleUpdateElements (modules4install))));
+        boolean ok = PluginManager.openInstallWizard(installContainer);
+        if (!ok) {
+            progressMonitor.onError("cancel"); // NOI18N
         }
-        progressMonitor.onDownload(downloadHandle);
-        Validator v = installSupport.doDownload (downloadHandle, false);
-        if (verifyHandle == null) {
-            verifyHandle = ProgressHandleFactory.createHandle (
-                    getBundle ("InstallerMissingModules_Verify"));
-            }
-        progressMonitor.onValidate(verifyHandle);
-        Installer i = installSupport.doValidate (v, verifyHandle);
-        if (installHandle == null) {
-            installHandle = ProgressHandleFactory.createHandle (
-                    getBundle ("InstallerMissingModules_Install"));
-            }
-        progressMonitor.onInstall(installHandle);
-        Restarter r = installSupport.doInstall (i, installHandle);
-        if (r != null) {
-            installSupport.doRestartLater (r);
-        } else {
-            waitToModuleLoaded ();
-        }
-        /// XXX FindBrokenModules.clearModulesForRepair ();
     }
     
     public static String presentUpdateElements (Collection<UpdateElement> elems) {


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

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