# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /doma/jarda/netbeans-src/autoupdate # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: src/org/netbeans/modules/autoupdate/ResultsPanel.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ResultsPanel.java Base (1.62) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ResultsPanel.java Locally Modified (Based On 1.62) *************** *** 28,34 **** import org.openide.DialogDisplayer; import org.openide.ErrorManager; - import org.openide.awt.Mnemonics; import org.openide.util.NbBundle; import org.openide.NotifyDescriptor; import org.openide.util.Utilities; --- 28,33 ---- *************** *** 218,225 **** Downloader.saveCopy( getListSelection(), target ); } catch (FileNotFoundException fnfe) { ErrorManager.getDefault ().notify (ErrorManager.USER, ! ErrorManager.getDefault ().annotate (fnfe, ! NbBundle.getMessage (ResultsPanel.class, "CTL_Directory_not_exits", fnfe.getMessage ()))); } }//GEN-LAST:event_saveButtonActionPerformed --- 217,226 ---- Downloader.saveCopy( getListSelection(), target ); } catch (FileNotFoundException fnfe) { ErrorManager.getDefault ().notify (ErrorManager.USER, ! ErrorManager.getDefault().annotate(fnfe, ! NbBundle.getMessage(ResultsPanel.class, ! "CTL_Directory_not_exits", ! fnfe.getMessage()))); } }//GEN-LAST:event_saveButtonActionPerformed Index: src/org/netbeans/modules/autoupdate/catalog/ModuleSelectionPanel.form *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleSelectionPanel.form Base (1.4) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleSelectionPanel.form Locally Modified (Based On 1.4) Index: src/org/netbeans/modules/autoupdate/XMLUpdates.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/XMLUpdates.java Base (1.35) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/XMLUpdates.java Locally Modified (Based On 1.35) *************** *** 26,31 **** --- 26,33 ---- import java.util.HashMap; import java.util.Iterator; import java.util.Map; + import java.util.logging.Level; + import java.util.logging.Logger; import java.util.zip.GZIPInputStream; import javax.swing.SwingUtilities; import org.openide.ErrorManager; *************** *** 52,58 **** private static final String TAG_OTHER_ERROR = "other_error"; // NOI18N private static final String ATTR_MESSAGE_ERROR = "message"; // NOI18N ! private static final ErrorManager err = ErrorManager.getDefault ().getInstance ("org.netbeans.modules.autoupdate"); // NOI18N /** List of all modules */ private ArrayList modules; --- 54,60 ---- private static final String TAG_OTHER_ERROR = "other_error"; // NOI18N private static final String ATTR_MESSAGE_ERROR = "message"; // NOI18N ! private static final Logger err = Logger.getLogger("org.netbeans.modules.autoupdate"); // NOI18N /** List of all modules */ private ArrayList modules; *************** *** 369,375 **** Document document = null; java.net.HttpURLConnection.setFollowRedirects( true ); ! err.log ("Processing URL : " + xmlURL); // NOI18N try { --- 371,377 ---- Document document = null; java.net.HttpURLConnection.setFollowRedirects( true ); ! err.log(Level.FINE, "Processing URL : " + xmlURL); // NOI18N try { *************** *** 382,397 **** reader = new BufferedReader (new InputStreamReader (new GZIPInputStream (urlToGZip.openStream ()))); xmlInputSource = new InputSource (reader); ! err.log ("Successfully read URL " + urlToGZip); // NOI18N } catch (IOException ioe) { ! err.log ("Reading GZIP URL " + urlToGZip + " failed (" + ioe + "). Try read XML directly " + xmlURL); // NOI18N xmlInputSource = new InputSource( xmlURL.toExternalForm() ); ! err.log ("Successfully read URL " + xmlURL); // NOI18N } if ( checkCanceled ) { ! err.log ("Connection canceled on user's demand."); // NOI18N return null; } --- 384,401 ---- reader = new BufferedReader (new InputStreamReader (new GZIPInputStream (urlToGZip.openStream ()))); xmlInputSource = new InputSource (reader); ! err.log(Level.FINE, "Successfully read URL " + urlToGZip); // NOI18N } catch (IOException ioe) { ! err.log(Level.FINE, ! "Reading GZIP URL " + urlToGZip + " failed (" + ioe + ! "). Try read XML directly " + xmlURL); // NOI18N xmlInputSource = new InputSource( xmlURL.toExternalForm() ); ! err.log(Level.FINE, "Successfully read URL " + xmlURL); // NOI18N } if ( checkCanceled ) { ! err.log(Level.FINE, "Connection canceled on user\'s demand."); // NOI18N return null; } *************** *** 403,409 **** } private void showParseError(Throwable t) { ! ErrorManager.getDefault().annotate(t, ErrorManager.UNKNOWN, "URL: " + xmlURL, null, null, null); // NOI18N ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, t); } --- 407,414 ---- } private void showParseError(Throwable t) { ! ErrorManager.getDefault().annotate(t, ErrorManager.UNKNOWN, ! "URL: " + xmlURL, null, null, null); // NOI18N ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, t); } Index: src/org/netbeans/modules/autoupdate/XMLAutoupdateType.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateType.java Base (1.41) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateType.java Locally Modified (Based On 1.41) *************** *** 20,25 **** --- 20,26 ---- import java.util.StringTokenizer; import java.io.IOException; import java.util.Collections; + import java.util.Date; import java.util.MissingResourceException; import java.util.ResourceBundle; *************** *** 174,180 **** IllegalArgumentException iae = new IllegalArgumentException (ex.getMessage()); String msg = MessageFormat.format( NbBundle.getMessage (XMLAutoupdateType.class, "FMT_EXC_BAD_URL"), new Object [] {spec}); //NOI18N ! ErrorManager.getDefault ().annotate (iae, ErrorManager.USER, ex.getMessage (), msg, ex, new java.util.Date ()); throw iae; } --- 175,183 ---- IllegalArgumentException iae = new IllegalArgumentException (ex.getMessage()); String msg = MessageFormat.format( NbBundle.getMessage (XMLAutoupdateType.class, "FMT_EXC_BAD_URL"), new Object [] {spec}); //NOI18N ! ErrorManager.getDefault().annotate(iae, ErrorManager.USER, ! ex.getMessage(), msg, ex, ! new Date()); throw iae; } *************** *** 248,255 **** updateURL = new URL( encode( replace( original.toString() ) ) ); } catch (java.net.MalformedURLException e) { ! ErrorManager.getDefault ().notify (e); ! }; return updateURL; --- 251,258 ---- updateURL = new URL( encode( replace( original.toString() ) ) ); } catch (java.net.MalformedURLException e) { ! ErrorManager.getDefault().notify(e); ! } return updateURL; Index: src/org/netbeans/modules/autoupdate/catalog/ModuleBean.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleBean.java Base (1.5) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleBean.java Locally Modified (Based On 1.5) *************** *** 14,21 **** package org.netbeans.modules.autoupdate.catalog; import java.awt.Component; ! import java.awt.Cursor; ! import java.awt.Dialog; import org.netbeans.core.NbTopManager; import org.netbeans.core.startup.*; import org.netbeans.*; --- 14,20 ---- package org.netbeans.modules.autoupdate.catalog; import java.awt.Component; ! import java.util.logging.Logger; import org.netbeans.core.NbTopManager; import org.netbeans.core.startup.*; import org.netbeans.*; *************** *** 26,31 **** --- 25,31 ---- import java.beans.*; import org.openide.*; import java.io.IOException; + import java.util.logging.Level; import org.openide.util.*; /** Bean representing a module. *************** *** 36,42 **** */ public final class ModuleBean implements Runnable, PropertyChangeListener { ! private static final ErrorManager err = ErrorManager.getDefault().getInstance("org.netbeans.modules.autoupdate.catalog.ModuleBean"); // NOI18N private final Module module; --- 36,42 ---- */ public final class ModuleBean implements Runnable, PropertyChangeListener { ! private static final Logger err = Logger.getLogger("org.netbeans.modules.autoupdate.catalog.ModuleBean"); // NOI18N private final Module module; *************** *** 73,81 **** private void loadProps() { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); ! err.log("loadProps: module=" + module); if (! module.isValid()) { ! err.log("invalid, forget it..."); return; } // Set fields. Called inside read mutex. --- 73,81 ---- private void loadProps() { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); ! err.log(Level.FINE, "loadProps: module=" + module); if (! module.isValid()) { ! err.log(Level.FINE, "invalid, forget it..."); return; } // Set fields. Called inside read mutex. *************** *** 154,160 **** public void setEnabled(boolean e) { if (enabled == e) return; if (jar == null || autoload || eager || problematic) throw new IllegalStateException(); ! err.log("setEnabled: module=" + module + " enabled=" + e); enabled = e; // optimistic change supp.firePropertyChange("enabled", null, null); // NOI18N Update u = new Update(e ? "enable" : "disable", module); // NOI18N --- 154,160 ---- public void setEnabled(boolean e) { if (enabled == e) return; if (jar == null || autoload || eager || problematic) throw new IllegalStateException(); ! err.log(Level.FINE, "setEnabled: module=" + module + " enabled=" + e); enabled = e; // optimistic change supp.firePropertyChange("enabled", null, null); // NOI18N Update u = new Update(e ? "enable" : "disable", module); // NOI18N *************** *** 180,186 **** public void setReloadable(boolean r) { // XXX sanity-check if (reloadable == r) return; ! err.log("setReloadable: module=" + module + " reloadable=" + r); reloadable = r; // optimistic change supp.firePropertyChange("reloadable", null, null); // NOI18N Update u = new Update(r ? "makeReloadable" : "makeUnreloadable", module); // NOI18N --- 180,187 ---- public void setReloadable(boolean r) { // XXX sanity-check if (reloadable == r) return; ! err.log(Level.FINE, ! "setReloadable: module=" + module + " reloadable=" + r); reloadable = r; // optimistic change supp.firePropertyChange("reloadable", null, null); // NOI18N Update u = new Update(r ? "makeReloadable" : "makeUnreloadable", module); // NOI18N *************** *** 190,196 **** /** Delete the module. */ public void delete() { if (jar == null) throw new IllegalStateException(); ! err.log("delete: module=" + module); Update u = new Update("delete", module); // NOI18N AllModulesBean.getDefault().update(u); } --- 191,197 ---- /** Delete the module. */ public void delete() { if (jar == null) throw new IllegalStateException(); ! err.log(Level.FINE, "delete: module=" + module); Update u = new Update("delete", module); // NOI18N AllModulesBean.getDefault().update(u); } *************** *** 256,264 **** public void propertyChange(PropertyChangeEvent evt) { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); // Something on the module changed. Inside read mutex. ! err.log("got changes: module=" + module + " evt=" + evt); if (/* #13834 */ evt != null && Module.PROP_CLASS_LOADER.equals(evt.getPropertyName())) { ! err.log("ignoring PROP_CLASS_LOADER"); // Speed optimization. return; } --- 257,265 ---- public void propertyChange(PropertyChangeEvent evt) { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); // Something on the module changed. Inside read mutex. ! err.log(Level.FINE, "got changes: module=" + module + " evt=" + evt); if (/* #13834 */ evt != null && Module.PROP_CLASS_LOADER.equals(evt.getPropertyName())) { ! err.log(Level.FINE, "ignoring PROP_CLASS_LOADER"); // Speed optimization. return; } *************** *** 269,275 **** public void run() { if (! SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); // Inside event thread after a change. ! err.log("firing changes: module=" + module); supp.firePropertyChange(null, null, null); ModuleSelectionPanel.getGUI (false).setWaitingState (false, false); } --- 270,276 ---- public void run() { if (! SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); // Inside event thread after a change. ! err.log(Level.FINE, "firing changes: module=" + module); supp.firePropertyChange(null, null, null); ModuleSelectionPanel.getGUI (false).setWaitingState (false, false); } *************** *** 322,328 **** /** Get the list of all modules. */ public synchronized ModuleBean[] getModules() { ! err.log("getModules: modules count=" + (modules == null ? "null" : String.valueOf(modules.length))); if (modules == null) { recalcTask = RequestProcessor.getDefault().post(new Reader()); modules = new ModuleBean[0]; --- 323,332 ---- /** Get the list of all modules. */ public synchronized ModuleBean[] getModules() { ! err.log(Level.FINE, ! "getModules: modules count=" + ! (modules == null ? "null" ! : String.valueOf(modules.length))); if (modules == null) { recalcTask = RequestProcessor.getDefault().post(new Reader()); modules = new ModuleBean[0]; *************** *** 348,354 **** /** Create a new module from JAR file, perhaps reloadable. */ public void create(File jar, boolean reloadable) { ! err.log("create: jar=" + jar); Update u = new Update(reloadable ? "createReloadable" : "create", jar); // NOI18N update(u); } --- 352,358 ---- /** Create a new module from JAR file, perhaps reloadable. */ public void create(File jar, boolean reloadable) { ! err.log(Level.FINE, "create: jar=" + jar); Update u = new Update(reloadable ? "createReloadable" : "create", jar); // NOI18N update(u); } *************** *** 362,374 **** public void run() { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); if (! theother) { ! err.log("will load modules in read mutex..."); Reader r = new Reader(); r.theother = true; mgr.mutex().readAccess(r); return; } ! err.log("first time, finding module list"); // First time. We are in read mutex and need to find out what is here. Set modulesSet = mgr.getModules(); ModuleBean[] _modules = new ModuleBean[modulesSet.size()]; --- 366,378 ---- public void run() { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); if (! theother) { ! err.log(Level.FINE, "will load modules in read mutex..."); Reader r = new Reader(); r.theother = true; mgr.mutex().readAccess(r); return; } ! err.log(Level.FINE, "first time, finding module list"); // First time. We are in read mutex and need to find out what is here. Set modulesSet = mgr.getModules(); ModuleBean[] _modules = new ModuleBean[modulesSet.size()]; *************** *** 391,397 **** public void run() { if (! SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); ! err.log("in event thread, will fire changes"); // Something changed and now we are in the event thread. // (Either list of modules or pending changes or both.) supp.firePropertyChange(null, null, null); --- 395,401 ---- public void run() { if (! SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); ! err.log(Level.FINE, "in event thread, will fire changes"); // Something changed and now we are in the event thread. // (Either list of modules or pending changes or both.) supp.firePropertyChange(null, null, null); *************** *** 399,405 **** public void propertyChange(PropertyChangeEvent evt) { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); ! err.log("got changes: evt=" + evt); ModuleSelectionPanel.getGUI (false).setWaitingState (true, true); if (ModuleManager.PROP_MODULES.equals(evt.getPropertyName())) { // Later on. Something changed. Again in read mutex. --- 403,409 ---- public void propertyChange(PropertyChangeEvent evt) { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); ! err.log(Level.FINE, "got changes: evt=" + evt); ModuleSelectionPanel.getGUI (false).setWaitingState (true, true); if (ModuleManager.PROP_MODULES.equals(evt.getPropertyName())) { // Later on. Something changed. Again in read mutex. *************** *** 435,447 **** /** Pause any pending updates for later. */ public void pause() { ! err.log("pause"); paused = true; } /** Resume any previously paused updates. */ public void resume() { ! err.log("resume"); paused = false; updaterTask.schedule (0); } --- 439,451 ---- /** Pause any pending updates for later. */ public void pause() { ! err.log(Level.FINE, "pause"); paused = true; } /** Resume any previously paused updates. */ public void resume() { ! err.log(Level.FINE, "resume"); paused = false; updaterTask.schedule (0); } *************** *** 448,454 **** /** Cancel any previously posted updates (whether paused or not). */ public void cancel() { ! err.log("cancel"); synchronized (updates) { updates.clear(); } --- 452,458 ---- /** Cancel any previously posted updates (whether paused or not). */ public void cancel() { ! err.log(Level.FINE, "cancel"); synchronized (updates) { updates.clear(); } *************** *** 471,477 **** // If nonempty, we are already waiting for it... boolean runme = updates.isEmpty(); updates.add(u); ! err.log("pending updates: " + updates); if (runme) { updaterTask.schedule (0); } --- 475,481 ---- // If nonempty, we are already waiting for it... boolean runme = updates.isEmpty(); updates.add(u); ! err.log(Level.FINE, "pending updates: " + updates); if (runme) { updaterTask.schedule (0); } *************** *** 487,501 **** public void run() { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); if (! mgr.mutex ().isWriteAccess ()) { ! err.log("saving all documents..."); org.openide.LifecycleManager.getDefault ().saveAll (); ! err.log("will run updates in write mutex..."); mgr.mutex().writeAccess(this); return; } try { if (paused) { ! err.log("run updates, but paused"); return; } ModuleSelectionPanel.getGUI (false).setWaitingState (true, true); --- 491,505 ---- public void run() { if (SwingUtilities.isEventDispatchThread()) throw new IllegalStateException(); if (! mgr.mutex ().isWriteAccess ()) { ! err.log(Level.FINE, "saving all documents..."); org.openide.LifecycleManager.getDefault ().saveAll (); ! err.log(Level.FINE, "will run updates in write mutex..."); mgr.mutex().writeAccess(this); return; } try { if (paused) { ! err.log(Level.FINE, "run updates, but paused"); return; } ModuleSelectionPanel.getGUI (false).setWaitingState (true, true); *************** *** 509,518 **** Iterator it; synchronized (updates) { if (updates.isEmpty()) { ! err.log("run updates, but empty"); return; } ! err.log("run updates: " + updates); it = new LinkedList(updates).iterator(); updates.clear(); } --- 513,522 ---- Iterator it; synchronized (updates) { if (updates.isEmpty()) { ! err.log(Level.FINE, "run updates, but empty"); return; } ! err.log(Level.FINE, "run updates: " + updates); it = new LinkedList(updates).iterator(); updates.clear(); } *************** *** 566,572 **** doCreate(toCreate, false); doCreate(toCreateReloable, true); } catch (RuntimeException re) { ! err.notify(re); // Never know. Revert everything to real state just in case. // #17873: if not inited, no need... ModuleBean[] _modules = modules; --- 570,576 ---- doCreate(toCreate, false); doCreate(toCreateReloable, true); } catch (RuntimeException re) { ! ErrorManager.getDefault().notify(re); // Never know. Revert everything to real state just in case. // #17873: if not inited, no need... ModuleBean[] _modules = modules; *************** *** 591,597 **** private void doDelete(Set modules) { if (modules.isEmpty()) return; ! err.log("doDelete: " + modules); // Have to be turned off first: doDisable(modules, false); Iterator it = modules.iterator(); --- 595,601 ---- private void doDelete(Set modules) { if (modules.isEmpty()) return; ! err.log(Level.FINE, "doDelete: " + modules); // Have to be turned off first: doDisable(modules, false); Iterator it = modules.iterator(); *************** *** 618,624 **** private void doDisable(Set modules, boolean cancelable) { if (modules.isEmpty()) return; ! err.log("doDisable: " + modules); SortedSet realModules = new TreeSet(this); // SortedSet realModules.addAll(modules); Iterator it = realModules.iterator(); --- 622,628 ---- private void doDisable(Set modules, boolean cancelable) { if (modules.isEmpty()) return; ! err.log(Level.FINE, "doDisable: " + modules); SortedSet realModules = new TreeSet(this); // SortedSet realModules.addAll(modules); Iterator it = realModules.iterator(); *************** *** 668,674 **** private void doEnable(Set modules) { if (modules.isEmpty()) return; ! err.log("doEnable: " + modules); SortedSet realModules = new TreeSet(this); // SortedSet realModules.addAll(modules); Iterator it = realModules.iterator(); --- 672,678 ---- private void doEnable(Set modules) { if (modules.isEmpty()) return; ! err.log(Level.FINE, "doEnable: " + modules); SortedSet realModules = new TreeSet(this); // SortedSet realModules.addAll(modules); Iterator it = realModules.iterator(); *************** *** 737,743 **** try { mgr.enable(realModules); } catch (InvalidException ie) { ! err.notify(ErrorManager.INFORMATIONAL, ie); Module bad = ie.getModule(); if (bad == null) throw new IllegalStateException(); ev.log(Events.FAILED_INSTALL_NEW_UNEXPECTED, bad, ie); --- 741,747 ---- try { mgr.enable(realModules); } catch (InvalidException ie) { ! err.log(Level.WARNING, null, ie); Module bad = ie.getModule(); if (bad == null) throw new IllegalStateException(); ev.log(Events.FAILED_INSTALL_NEW_UNEXPECTED, bad, ie); *************** *** 758,764 **** private void doCreate(Set files, boolean reloadable) { if (files.isEmpty()) return; ! err.log("doCreate: " + files + " reloadable=" + reloadable); Iterator it = files.iterator(); while (it.hasNext()) { File jar = (File)it.next(); --- 762,769 ---- private void doCreate(Set files, boolean reloadable) { if (files.isEmpty()) return; ! err.log(Level.FINE, ! "doCreate: " + files + " reloadable=" + reloadable); Iterator it = files.iterator(); while (it.hasNext()) { File jar = (File)it.next(); Index: src/org/netbeans/modules/autoupdate/Downloader.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/Downloader.java Base (1.50) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/Downloader.java Locally Modified (Based On 1.50) *************** *** 18,23 **** --- 18,25 ---- import java.text.MessageFormat; import java.util.Iterator; import java.util.List; + import java.util.logging.Level; + import java.util.logging.Logger; import org.netbeans.api.progress.ProgressHandle; import org.netbeans.api.progress.ProgressHandleFactory; import org.netbeans.updater.UpdateTracking; *************** *** 56,62 **** /** Wizard validator, enables the Next button in wizard */ private Wizard.Validator validator; ! private static final ErrorManager err = ErrorManager.getDefault ().getInstance ("org.netbeans.modules.autoupdate"); // NOI18N private static RequestProcessor.Task READ_TIMEOUT_CHECKER; private static RequestProcessor.Task DOWNLOAD_TASK; --- 58,64 ---- /** Wizard validator, enables the Next button in wizard */ private Wizard.Validator validator; ! private static final Logger err = Logger.getLogger("org.netbeans.modules.autoupdate"); // NOI18N private static RequestProcessor.Task READ_TIMEOUT_CHECKER; private static RequestProcessor.Task DOWNLOAD_TASK; *************** *** 116,122 **** progressDialog.setPartialLabel (getBundle( "CTL_PreparingDownload_Label")); // NOI18N ! err.log ("Start downloading " + modulesCount + " modules [" + downloadSize + "]"); downloadAll(); --- 118,126 ---- progressDialog.setPartialLabel (getBundle( "CTL_PreparingDownload_Label")); // NOI18N ! err.log(Level.FINE, ! "Start downloading " + modulesCount + ! " modules [" + downloadSize + "]"); downloadAll(); *************** *** 175,186 **** progressDialog.setPartialLabel (mu.getName () + " [" + (currentModule + 1) + "/" + modulesCount + "]"); // NOI18N if ( urlDownload ) { if (DOWNLOADER_FINISHED == getStatus () || DOWNLOADER_IS_INIT == getStatus ()) { ! err.log ("Do download " + mu.getName ()); setStatus (DOWNLOADER_IS_INIT); downloadModule (mu); ! err.log ("Download of " + mu.getName () + " ends with status " + getStatus ()); } else { ! err.log ("Don't download " + mu.getName () + " due to incorrect status " + getStatus ()); } } else { downloadModuleFromLocal (mu); --- 179,194 ---- progressDialog.setPartialLabel (mu.getName () + " [" + (currentModule + 1) + "/" + modulesCount + "]"); // NOI18N if ( urlDownload ) { if (DOWNLOADER_FINISHED == getStatus () || DOWNLOADER_IS_INIT == getStatus ()) { ! err.log(Level.FINE, "Do download " + mu.getName()); setStatus (DOWNLOADER_IS_INIT); downloadModule (mu); ! err.log(Level.FINE, ! "Download of " + mu.getName() + ! " ends with status " + getStatus()); } else { ! err.log(Level.FINE, ! "Don\'t download " + mu.getName() + ! " due to incorrect status " + getStatus()); } } else { downloadModuleFromLocal (mu); *************** *** 210,218 **** private void runVerifier () { ! err.log ("Prepare SignVerifier."); if (DOWNLOADER_VERIFIED == getStatus ()) { ! err.log ("Error: SignVerifier has run before."); return ; } --- 218,226 ---- private void runVerifier () { ! err.log(Level.FINE, "Prepare SignVerifier."); if (DOWNLOADER_VERIFIED == getStatus ()) { ! err.log(Level.FINE, "Error: SignVerifier has run before."); return ; } *************** *** 285,291 **** moduleUpdate.setDownloadStarted( true ); progressDialog.setEnableStop (true); ! err.log ("Setup checker of download " + moduleUpdate.getName ()); READ_TIMEOUT_CHECKER = getAutoupdateRequestProcessor ().post (new Runnable () { public void run () { confirmConnectionFailed (moduleUpdate); --- 293,300 ---- moduleUpdate.setDownloadStarted( true ); progressDialog.setEnableStop (true); ! err.log(Level.FINE, ! "Setup checker of download " + moduleUpdate.getName()); READ_TIMEOUT_CHECKER = getAutoupdateRequestProcessor ().post (new Runnable () { public void run () { confirmConnectionFailed (moduleUpdate); *************** *** 292,298 **** } }, TIME_TO_CONNECTION_CHECK * 4); ! err.log ("Try to estabilish a conncetion to " + moduleUpdate.getDistribution ()); progressDialog.setExtraLabel (getBundle ("DownloadProgressPanel.jLabel1.Establish")); // NOI18N URLConnection distrConnection = moduleUpdate.getDistribution().openConnection(); --- 301,309 ---- } }, TIME_TO_CONNECTION_CHECK * 4); ! err.log(Level.FINE, ! "Try to estabilish a conncetion to " + ! moduleUpdate.getDistribution()); progressDialog.setExtraLabel (getBundle ("DownloadProgressPanel.jLabel1.Establish")); // NOI18N URLConnection distrConnection = moduleUpdate.getDistribution().openConnection(); *************** *** 318,327 **** if (DOWNLOADER_FINISHED == getStatus ()) { moduleUpdate.setDownloadOK (true); ! err.log (moduleUpdate.getName () + " was downloaded correctly."); } else { moduleUpdate.setDownloadOK (false); ! err.log (moduleUpdate.getName () + " wasn't download correctly."); moduleUpdate.setSecurity (SignVerifier.BAD_DOWNLOAD); } --- 329,342 ---- if (DOWNLOADER_FINISHED == getStatus ()) { moduleUpdate.setDownloadOK (true); ! err.log(Level.FINE, ! moduleUpdate.getName() + ! " was downloaded correctly."); } else { moduleUpdate.setDownloadOK (false); ! err.log(Level.FINE, ! moduleUpdate.getName() + ! " wasn\'t download correctly."); moduleUpdate.setSecurity (SignVerifier.BAD_DOWNLOAD); } *************** *** 356,362 **** if (DOWNLOADER_RUNNING != getStatus () && DOWNLOADER_IS_INIT != getStatus ()) { return; } ! err.log ("Connection failed during download " + moduleUpdate.getName ()); setStatus (DOWNLOADER_WAITING); String mssg = NbBundle.getMessage( Downloader.class, "FMT_DownloadFailed", // NOI18N moduleUpdate.getName() ); --- 371,378 ---- if (DOWNLOADER_RUNNING != getStatus () && DOWNLOADER_IS_INIT != getStatus ()) { return; } ! err.log(Level.FINE, ! "Connection failed during download " + moduleUpdate.getName()); setStatus (DOWNLOADER_WAITING); String mssg = NbBundle.getMessage( Downloader.class, "FMT_DownloadFailed", // NOI18N moduleUpdate.getName() ); *************** *** 366,372 **** DialogDisplayer.getDefault().notify( nd ); if ( nd.getValue().equals( NotifyDescriptor.CANCEL_OPTION ) ) { ! err.log ("Confirm of the failed connection was canceled, continue downloading."); // set status RUNNING back setStatus (DOWNLOADER_RUNNING); --- 382,389 ---- DialogDisplayer.getDefault().notify( nd ); if ( nd.getValue().equals( NotifyDescriptor.CANCEL_OPTION ) ) { ! err.log(Level.FINE, ! "Confirm of the failed connection was canceled, continue downloading."); // set status RUNNING back setStatus (DOWNLOADER_RUNNING); *************** *** 380,386 **** validator.setValid (false); return ; } else if (nd.getValue ().equals (NotifyDescriptor.NO_OPTION)) { ! err.log ("Interrupt download of " + moduleUpdate.getName ()); validator.setValid (true); setStatus (DOWNLOADER_CANCELED); moduleUpdate.setDownloadOK (false); --- 397,404 ---- validator.setValid (false); return ; } else if (nd.getValue ().equals (NotifyDescriptor.NO_OPTION)) { ! err.log(Level.FINE, ! "Interrupt download of " + moduleUpdate.getName()); validator.setValid (true); setStatus (DOWNLOADER_CANCELED); moduleUpdate.setDownloadOK (false); *************** *** 406,412 **** // try again moduleUpdate.setDownloadStarted (false); ! err.log ("Failed connection was confirmed, start download " + moduleUpdate.getName () + " again."); progressDialog.setExtraLabel (getBundle ("DownloadProgressPanel.jLabel1.Restart")); // NOI18N RequestProcessor.getDefault ().post (new Runnable () { public void run () { --- 424,432 ---- // try again moduleUpdate.setDownloadStarted (false); ! err.log(Level.FINE, ! "Failed connection was confirmed, start download " + ! moduleUpdate.getName() + " again."); progressDialog.setExtraLabel (getBundle ("DownloadProgressPanel.jLabel1.Restart")); // NOI18N RequestProcessor.getDefault ().post (new Runnable () { public void run () { Index: src/org/netbeans/modules/autoupdate/XMLAutoupdateTypeBeanInfo.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateTypeBeanInfo.java Base (1.15) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/XMLAutoupdateTypeBeanInfo.java Locally Modified (Based On 1.15) *************** *** 15,20 **** --- 15,21 ---- import java.awt.Image; import java.beans.*; + import org.openide.ErrorManager; import org.openide.util.NbBundle; *************** *** 43,49 **** try { return new BeanInfo[] { Introspector.getBeanInfo (AutoupdateType.class) }; } catch (IntrospectionException ie) { ! org.openide.ErrorManager.getDefault().notify(ie); return null; } } --- 44,50 ---- try { return new BeanInfo[] { Introspector.getBeanInfo (AutoupdateType.class) }; } catch (IntrospectionException ie) { ! ErrorManager.getDefault().notify(ie); return null; } } Index: src/org/netbeans/modules/autoupdate/SignVerifier.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/SignVerifier.java Base (1.37) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/SignVerifier.java Locally Modified (Based On 1.37) *************** *** 19,34 **** import java.security.cert.Certificate; import java.util.*; import java.util.jar.*; import org.netbeans.api.progress.ProgressHandle; import org.netbeans.api.progress.ProgressHandleFactory; import org.openide.ErrorManager; import org.openide.util.NbBundle; - import org.openide.util.RequestProcessor; - - - /** Class for verifying signs in NBM Files. * @author Martin Ryzl, Petr Hrebejk */ --- 19,35 ---- import java.security.cert.Certificate; import java.util.*; import java.util.jar.*; + import java.util.logging.Level; + import java.util.logging.Logger; import org.netbeans.api.progress.ProgressHandle; import org.netbeans.api.progress.ProgressHandleFactory; import org.openide.ErrorManager; import org.openide.util.NbBundle; /** Class for verifying signs in NBM Files. * @author Martin Ryzl, Petr Hrebejk *************** *** 74,80 **** ProgressHandle overallHandle; long startTime; ! private static final ErrorManager err = ErrorManager.getDefault ().getInstance ("org.netbeans.modules.autoupdate"); // NOI18N /** Creates new VeriSign */ SignVerifier (DownloadProgressPanel progressDialog, Wizard.Validator validator) { --- 72,78 ---- ProgressHandle overallHandle; long startTime; ! private static final Logger err = Logger.getLogger("org.netbeans.modules.autoupdate"); // NOI18N /** Creates new VeriSign */ SignVerifier (DownloadProgressPanel progressDialog, Wizard.Validator validator) { *************** *** 89,95 **** progressDialog.setPartialLabel (getBundle( "CTL_PreparingVerify_Label")); // NOI18N verifySize = getTotalVerifySize(); ! err.log ("Runing doVerify, check the total size " + verifySize + ", verifyCanceled? " + verifyCanceled); if ( verifyCanceled ) return; --- 87,95 ---- progressDialog.setPartialLabel (getBundle( "CTL_PreparingVerify_Label")); // NOI18N verifySize = getTotalVerifySize(); ! err.log(Level.FINE, ! "Runing doVerify, check the total size " + verifySize + ! ", verifyCanceled? " + verifyCanceled); if ( verifyCanceled ) return; *************** *** 96,102 **** verifyAll(); ! err.log ("Verification done."); if ( verifyCanceled ) return; --- 96,102 ---- verifyAll(); ! err.log(Level.FINE, "Verification done."); if ( verifyCanceled ) return; *************** *** 157,163 **** Collection certificates = verifyJar( file, mu ); if ( certificates == null ) { ! err.log (mu.getName () + " was verified as NOT_SIGNED"); mu.setSecurity( NOT_SIGNED ); mu.setInstallApproved( false ); --- 157,164 ---- Collection certificates = verifyJar( file, mu ); if ( certificates == null ) { ! err.log(Level.FINE, ! mu.getName() + " was verified as NOT_SIGNED"); mu.setSecurity( NOT_SIGNED ); mu.setInstallApproved( false ); *************** *** 166,177 **** mu.setCerts( certificates ); if ( isTrusted( certificates ) ) { ! err.log (mu.getName () + " was verified as TRUSTED"); mu.setSecurity( TRUSTED ); mu.setInstallApproved( true ); } else { ! err.log (mu.getName () + " was verified as SIGNED"); mu.setSecurity( SIGNED ); mu.setInstallApproved( false ); } --- 167,180 ---- mu.setCerts( certificates ); if ( isTrusted( certificates ) ) { ! err.log(Level.FINE, ! mu.getName() + " was verified as TRUSTED"); mu.setSecurity( TRUSTED ); mu.setInstallApproved( true ); } else { ! err.log(Level.FINE, ! mu.getName() + " was verified as SIGNED"); mu.setSecurity( SIGNED ); mu.setInstallApproved( false ); } *************** *** 178,189 **** } } catch( SecurityException e ) { ! err.log (mu.getName () + " was verified as CORRUPTED"); mu.setSecurity( CORRUPTED ); mu.setInstallApproved( false ); } catch( IOException e ) { ! err.log (mu.getName () + " was verified as BAD_DOWNLOAD"); mu.setSecurity( BAD_DOWNLOAD ); mu.setInstallApproved( false ); mu.setDownloadOK( false ); --- 181,194 ---- } } catch( SecurityException e ) { ! err.log(Level.FINE, ! mu.getName() + " was verified as CORRUPTED"); mu.setSecurity( CORRUPTED ); mu.setInstallApproved( false ); } catch( IOException e ) { ! err.log(Level.FINE, ! mu.getName() + " was verified as BAD_DOWNLOAD"); mu.setSecurity( BAD_DOWNLOAD ); mu.setInstallApproved( false ); mu.setDownloadOK( false ); *************** *** 294,300 **** } } ! err.log ("Update " + mu.getCodeNameBase () + " was verified as forced to intall global: " + mu.isForcedGlobal () + " and safeToInstall: " + mu.isSafeToInstall ()); if ( verifyCanceled ) return null; --- 299,309 ---- } } ! err.log(Level.FINE, ! "Update " + mu.getCodeNameBase() + ! " was verified as forced to intall global: " + ! mu.isForcedGlobal() + " and safeToInstall: " + ! mu.isSafeToInstall()); if ( verifyCanceled ) return null; Index: src/org/netbeans/modules/autoupdate/catalog/ModuleNode.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleNode.java Base (1.9) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleNode.java Locally Modified (Based On 1.9) Index: src/org/netbeans/modules/autoupdate/catalog/ModuleSelectionPanel.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleSelectionPanel.java Base (1.17) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleSelectionPanel.java Locally Modified (Based On 1.17) *************** *** 23,30 **** import java.beans.PropertyChangeListener; import java.beans.PropertyVetoException; import java.io.CharConversionException; import javax.swing.ActionMap; - import javax.swing.JComponent; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; import javax.swing.UIManager; --- 23,34 ---- import java.beans.PropertyChangeListener; import java.beans.PropertyVetoException; import java.io.CharConversionException; + import java.util.logging.Level; + import java.util.logging.Logger; import javax.swing.ActionMap; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; *************** *** 58,64 **** implements PropertyChangeListener { private TreeTableView treeTableView; ! private static final ErrorManager err = ErrorManager.getDefault().getInstance("org.netbeans.modules.autoupdate.catalog.ModuleSelectionPanel"); // NOI18N /** default size values */ private static final int DEF_TREE_WIDTH = 420; --- 59,65 ---- implements PropertyChangeListener { private TreeTableView treeTableView; ! private static final Logger err = Logger.getLogger("org.netbeans.modules.autoupdate.catalog.ModuleSelectionPanel"); // NOI18N /** default size values */ private static final int DEF_TREE_WIDTH = 420; *************** *** 177,183 **** private void doSetWaitingState (boolean wait, boolean showProgress) { assert SwingUtilities.isEventDispatchThread (); if (! this.isVisible ()) return ; ! err.log ("Set waiting state on ModuleSelectionPanel to (wait:" + wait + ", showProgress: " + showProgress + ")"); uninstallButton.setEnabled (! wait); if (wait) { if (cursor == null) cursor = getCursor(); --- 178,186 ---- private void doSetWaitingState (boolean wait, boolean showProgress) { assert SwingUtilities.isEventDispatchThread (); if (! this.isVisible ()) return ; ! err.log(Level.FINE, ! "Set waiting state on ModuleSelectionPanel to (wait:" + wait + ! ", showProgress: " + showProgress + ")"); uninstallButton.setEnabled (! wait); if (wait) { if (cursor == null) cursor = getCursor(); Index: src/org/netbeans/modules/autoupdate/DummyModuleInfo.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/DummyModuleInfo.java Base (1.12) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/DummyModuleInfo.java Locally Modified (Based On 1.12) Index: src/org/netbeans/modules/autoupdate/ResultsPanel.form *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ResultsPanel.form Base (1.27) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ResultsPanel.form Locally Modified (Based On 1.27) Index: src/org/netbeans/modules/autoupdate/ExternalDialog.form *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ExternalDialog.form Base (1.4) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ExternalDialog.form Locally Modified (Based On 1.4) *************** *** 9,14 **** --- 9,18 ---- + + + + Index: src/org/netbeans/modules/autoupdate/ExternalDialog.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ExternalDialog.java Base (1.13) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ExternalDialog.java Locally Modified (Based On 1.13) *************** *** 15,21 **** import java.awt.Font; import javax.swing.JButton; - import java.text.MessageFormat; import java.net.URL; import org.openide.DialogDescriptor; --- 15,20 ---- *************** *** 215,221 **** HtmlBrowser.URLDisplayer.getDefault().showURL( new URL ( external.getStart_url() )); } catch ( java.net.MalformedURLException e ) { ! ErrorManager.getDefault().notify( e ); } dialog.setVisible( false ); --- 214,220 ---- HtmlBrowser.URLDisplayer.getDefault().showURL( new URL ( external.getStart_url() )); } catch ( java.net.MalformedURLException e ) { ! ErrorManager.getDefault().notify(e); } dialog.setVisible( false ); Index: src/org/netbeans/modules/autoupdate/AutoupdateTypeBeanInfo.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/AutoupdateTypeBeanInfo.java Base (1.8) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/AutoupdateTypeBeanInfo.java Locally Modified (Based On 1.8) *************** *** 15,20 **** --- 15,21 ---- import java.awt.Image; import java.beans.*; + import org.openide.ErrorManager; import org.openide.util.NbBundle; *************** *** 43,49 **** try { return new BeanInfo[] { Introspector.getBeanInfo (org.openide.ServiceType.class) }; } catch (IntrospectionException ie) { ! org.openide.ErrorManager.getDefault().notify(ie); return null; } } --- 44,50 ---- try { return new BeanInfo[] { Introspector.getBeanInfo (org.openide.ServiceType.class) }; } catch (IntrospectionException ie) { ! ErrorManager.getDefault().notify(ie); return null; } } Index: src/org/netbeans/modules/autoupdate/catalog/ModuleDeleterImpl.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleDeleterImpl.java Base (1.2) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/catalog/ModuleDeleterImpl.java Locally Modified (Based On 1.2) *************** *** 13,21 **** package org.netbeans.modules.autoupdate.catalog; import org.netbeans.Module; - import org.netbeans.modules.autoupdate.*; - import org.netbeans.modules.autoupdate.catalog.ModuleDeleter; import org.openide.filesystems.FileUtil; import org.openide.modules.InstalledFileLocator; import org.openide.util.RequestProcessor; --- 13,23 ---- package org.netbeans.modules.autoupdate.catalog; + import java.util.logging.Logger; import org.netbeans.Module; import org.openide.filesystems.FileUtil; import org.openide.modules.InstalledFileLocator; *************** *** 29,34 **** --- 28,34 ---- import java.util.HashSet; import java.util.Iterator; import java.util.Set; + import java.util.logging.Level; import org.openide.filesystems.FileObject; import org.openide.filesystems.Repository; *************** *** 63,73 **** private static final int MAX_CHECKS_OF_STATE = 50; private static final int HOLD_ON_PROPAGATE_DISABLE = 1000; ! private ErrorManager err = ErrorManager.getDefault ().getInstance ("org.netbeans.modules.autoupdate.ModuleDeleterImpl"); // NOI18N public boolean canDelete (Module module) { if (module.isFixed ()) { ! err.log ("Cannot delete module because module " + module.getCodeName () + " isFixed."); } return !module.isFixed () && findUpdateTracking (module, ONLY_FROM_AUTOUPDATE); } --- 63,75 ---- private static final int MAX_CHECKS_OF_STATE = 50; private static final int HOLD_ON_PROPAGATE_DISABLE = 1000; ! private Logger err = Logger.getLogger("org.netbeans.modules.autoupdate.ModuleDeleterImpl"); // NOI18N public boolean canDelete (Module module) { if (module.isFixed ()) { ! err.log(Level.FINE, ! "Cannot delete module because module " + ! module.getCodeName() + " isFixed."); } return !module.isFixed () && findUpdateTracking (module, ONLY_FROM_AUTOUPDATE); } *************** *** 77,83 **** throw new IllegalArgumentException ("Module argument cannot be null."); } ! err.log ("Find and delete " + module.getCodeNameBase () + " module config file."); removeControlModuleFile (module); RequestProcessor.Task cleaner = RequestProcessor.getDefault ().create (new Runnable () { --- 79,87 ---- throw new IllegalArgumentException ("Module argument cannot be null."); } ! err.log(Level.FINE, ! "Find and delete " + module.getCodeNameBase() + ! " module config file."); removeControlModuleFile (module); RequestProcessor.Task cleaner = RequestProcessor.getDefault ().create (new Runnable () { *************** *** 85,92 **** try { removeModuleFiles (module); } catch (IOException ioe) { ! err.annotate (ioe, "ERROR: During processing removeModuleFiles (" + module.getDisplayName () + ")"); ! err.notify (ioe); } } }); --- 89,99 ---- try { removeModuleFiles (module); } catch (IOException ioe) { ! ErrorManager.getDefault().annotate(ioe, ! "ERROR: During processing removeModuleFiles (" + ! module.getDisplayName() + ! ")"); ! ErrorManager.getDefault().notify(ioe); } } }); *************** *** 113,122 **** File configFile = null; while ((configFile = locateControlFile (m)) != null) { if (configFile != null && configFile.exists ()) { ! err.log ("Try detele the config File " + configFile); FileUtil.toFileObject (configFile).delete (); } else { ! err.log ("Warning: Config File " + configFile + " doesn't exist!"); } } } --- 120,130 ---- File configFile = null; while ((configFile = locateControlFile (m)) != null) { if (configFile != null && configFile.exists ()) { ! err.log(Level.FINE, "Try detele the config File " + configFile); FileUtil.toFileObject (configFile).delete (); } else { ! err.log(Level.FINE, ! "Warning: Config File " + configFile + " doesn\'t exist!"); } } } *************** *** 132,149 **** //err.log ("Find UPDATE_TRACKING: " + updateTracking + " found."); // check the write permission if (! updateTracking.getParentFile ().canWrite ()) { ! err.log ("Cannot delete module " + module.getCodeName () + " because no write permission to directory " + updateTracking.getParent ()); return false; } if (checkIfFromAutoupdate) { boolean isFromAutoupdate = fromAutoupdate (getModuleConfiguration (updateTracking)); ! err.log ("Is Module " + module.getCodeName () + " installed by AutoUpdate? " + isFromAutoupdate); return isFromAutoupdate; } else { return true; } } else { ! err.log ("Cannot delete module " + module.getCodeName () + " because no update_tracking file found."); return false; } } --- 140,164 ---- //err.log ("Find UPDATE_TRACKING: " + updateTracking + " found."); // check the write permission if (! updateTracking.getParentFile ().canWrite ()) { ! err.log(Level.FINE, ! "Cannot delete module " + module.getCodeName() + ! " because no write permission to directory " + ! updateTracking.getParent()); return false; } if (checkIfFromAutoupdate) { boolean isFromAutoupdate = fromAutoupdate (getModuleConfiguration (updateTracking)); ! err.log(Level.FINE, ! "Is Module " + module.getCodeName() + ! " installed by AutoUpdate? " + isFromAutoupdate); return isFromAutoupdate; } else { return true; } } else { ! err.log(Level.FINE, ! "Cannot delete module " + module.getCodeName() + ! " because no update_tracking file found."); return false; } } *************** *** 163,169 **** } private void removeModuleFilesInCluster (Module module, File updateTracking) throws IOException { ! err.log ("Read update_tracking " + updateTracking + " file."); Set/**/ moduleFiles = readModuleFiles (getModuleConfiguration (updateTracking)); String configFile = "config" + '/' + "Modules" + '/' + module.getCodeNameBase ().replace ('.', '-') + ".xml"; // NOI18N if (moduleFiles.contains (configFile)) { --- 178,184 ---- } private void removeModuleFilesInCluster (Module module, File updateTracking) throws IOException { ! err.log(Level.FINE, "Read update_tracking " + updateTracking + " file."); Set/**/ moduleFiles = readModuleFiles (getModuleConfiguration (updateTracking)); String configFile = "config" + '/' + "Modules" + '/' + module.getCodeNameBase ().replace ('.', '-') + ".xml"; // NOI18N if (moduleFiles.contains (configFile)) { *************** *** 182,200 **** } assert file.exists () : "File " + file + " exists."; if (file.exists ()) { ! err.log ("File " + file + " is deleted."); try { FileUtil.toFileObject (file).delete (); } catch (IOException ioe) { assert false : "Waring: IOException " + ioe.getMessage () + " was caught. Propably file lock on the file."; ! err.log ("Waring: IOException " + ioe.getMessage () + " was caught. Propably file lock on the file."); ! err.log ("Try call File.deleteOnExit() on " + file); file.deleteOnExit (); } } } FileUtil.toFileObject (updateTracking).delete (); ! err.log ("File " + updateTracking + " is deleted."); } private Node getModuleConfiguration (File moduleUpdateTracking) { --- 197,218 ---- } assert file.exists () : "File " + file + " exists."; if (file.exists ()) { ! err.log(Level.FINE, "File " + file + " is deleted."); try { FileUtil.toFileObject (file).delete (); } catch (IOException ioe) { assert false : "Waring: IOException " + ioe.getMessage () + " was caught. Propably file lock on the file."; ! err.log(Level.FINE, ! "Waring: IOException " + ioe.getMessage() + ! " was caught. Propably file lock on the file."); ! err.log(Level.FINE, ! "Try call File.deleteOnExit() on " + file); file.deleteOnExit (); } } } FileUtil.toFileObject (updateTracking).delete (); ! err.log(Level.FINE, "File " + updateTracking + " is deleted."); } private Node getModuleConfiguration (File moduleUpdateTracking) { *************** *** 248,254 **** if (fileNodes.item (i).hasAttributes ()) { NamedNodeMap map = fileNodes.item (i).getAttributes (); files.add (map.getNamedItem (ATTR_FILE_NAME).getNodeValue ()); ! err.log ("File to delete: " + map.getNamedItem (ATTR_FILE_NAME).getNodeValue ()); } } return files; --- 266,274 ---- if (fileNodes.item (i).hasAttributes ()) { NamedNodeMap map = fileNodes.item (i).getAttributes (); files.add (map.getNamedItem (ATTR_FILE_NAME).getNodeValue ()); ! err.log(Level.FINE, ! "File to delete: " + ! map.getNamedItem(ATTR_FILE_NAME).getNodeValue()); } } return files; *************** *** 268,277 **** checks ++; if (m.isEnabled () && m.isValid ()) { if (checks < MAX_CHECKS_OF_STATE) { ! err.log ("Module " + m.getCodeNameBase () + " is still valid, repost later."); RequestProcessor.getDefault ().post (this, TIME_TO_CHECK); } else { ! err.log ("Warning: Module " + m.getCodeNameBase () + " is still valid but time-out. Task is terminated."); } return ; } --- 288,301 ---- checks ++; if (m.isEnabled () && m.isValid ()) { if (checks < MAX_CHECKS_OF_STATE) { ! err.log(Level.FINE, ! "Module " + m.getCodeNameBase() + ! " is still valid, repost later."); RequestProcessor.getDefault ().post (this, TIME_TO_CHECK); } else { ! err.log(Level.FINE, ! "Warning: Module " + m.getCodeNameBase() + ! " is still valid but time-out. Task is terminated."); } return ; } *************** *** 286,292 **** public void run () { // XXX: the modules list should be delete automatically when config/Modules/module.xml is removed FileObject modulesRoot = Repository.getDefault ().getDefaultFileSystem ().findResource ("Modules"); // NOI18N ! err.log ("It's a hack: Call refresh on " + modulesRoot + " file object."); if (modulesRoot != null) { modulesRoot.refresh (); } --- 310,318 ---- public void run () { // XXX: the modules list should be delete automatically when config/Modules/module.xml is removed FileObject modulesRoot = Repository.getDefault ().getDefaultFileSystem ().findResource ("Modules"); // NOI18N ! err.log(Level.FINE, ! "It\'s a hack: Call refresh on " + modulesRoot + ! " file object."); if (modulesRoot != null) { modulesRoot.refresh (); } Index: src/org/netbeans/modules/autoupdate/DependencyChecker.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/DependencyChecker.java Base (1.28) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/DependencyChecker.java Locally Modified (Based On 1.28) *************** *** 14,21 **** package org.netbeans.modules.autoupdate; import java.util.*; import org.openide.DialogDisplayer; - import org.openide.ErrorManager; import org.openide.util.NbBundle; import org.openide.NotifyDescriptor; --- 14,25 ---- package org.netbeans.modules.autoupdate; import java.util.*; + import java.util.logging.Level; + import java.util.logging.Logger; import org.openide.DialogDisplayer; import org.openide.util.NbBundle; *************** *** 33,59 **** DependencyChecker() { } ! private static final ErrorManager err = ErrorManager.getDefault ().getInstance ("org.netbeans.modules.autoupdate"); // NOI18N /** Gets collection of modules which have to be added to download list * if we have to add the toAddModule. */ Collection modulesToAdd( ModuleUpdate toAdd, Enumeration selected, List group, StringBuffer dontAddModuleName ) { ! err.log ("DO modulesToAdd: " + toAdd.getCodeNameBase () + "[L10N? " + (toAdd instanceof L10NUpdate) + "], group: " + group + ", dontAddModuleName: " + dontAddModuleName); Collection result = new ArrayList(); checkDependencies( toAdd.getRemoteModule(), result, selected, group, dontAddModuleName, toAdd.getLocalModule() != null ); ! if (err.isLoggable (ErrorManager.INFORMATIONAL)) { String res = ""; Iterator it = result.iterator (); while (it.hasNext ()) { ModuleUpdate mu = (ModuleUpdate) it.next (); res = res + mu.getCodeNameBase () + "[L10N? " + (mu instanceof L10NUpdate) + "], "; ! err.log ("modulesToAdd: " + toAdd.getCodeNameBase () + ", RETURNS: " + res); } } // add localization dependency ! err.log ("Do find localization for " + toAdd.getCodeNameBase () + " on locale " + Locale.getDefault ()); checkFreeLocalizationDependency (toAdd, Locale.getDefault ().toString (), result, selected, group); return result; --- 34,67 ---- DependencyChecker() { } ! private static final Logger err = Logger.getLogger("org.netbeans.modules.autoupdate"); // NOI18N /** Gets collection of modules which have to be added to download list * if we have to add the toAddModule. */ Collection modulesToAdd( ModuleUpdate toAdd, Enumeration selected, List group, StringBuffer dontAddModuleName ) { ! err.log(Level.FINE, ! "DO modulesToAdd: " + toAdd.getCodeNameBase() + "[L10N? " + ! (toAdd instanceof L10NUpdate) + "], group: " + group + ! ", dontAddModuleName: " + dontAddModuleName); Collection result = new ArrayList(); checkDependencies( toAdd.getRemoteModule(), result, selected, group, dontAddModuleName, toAdd.getLocalModule() != null ); ! if (err.isLoggable(Level.FINE)) { String res = ""; Iterator it = result.iterator (); while (it.hasNext ()) { ModuleUpdate mu = (ModuleUpdate) it.next (); res = res + mu.getCodeNameBase () + "[L10N? " + (mu instanceof L10NUpdate) + "], "; ! err.log(Level.FINE, ! "modulesToAdd: " + toAdd.getCodeNameBase() + ! ", RETURNS: " + res); } } // add localization dependency ! err.log(Level.FINE, ! "Do find localization for " + toAdd.getCodeNameBase() + ! " on locale " + Locale.getDefault()); checkFreeLocalizationDependency (toAdd, Locale.getDefault ().toString (), result, selected, group); return result; *************** *** 123,129 **** if ( ok ) { if ( !result.contains( mu ) ) { ! err.log (" ADDED[SELECTED]: " + mu.getCodeNameBase () + "[L10N? " + (mu instanceof L10NUpdate) + "]: DEP: " + deps [j]); result.add( mu ); } break; --- 131,141 ---- if ( ok ) { if ( !result.contains( mu ) ) { ! err.log(Level.FINE, ! " ADDED[SELECTED]: " + ! mu.getCodeNameBase() + "[L10N? " + ! (mu instanceof L10NUpdate) + "]: DEP: " + ! deps[j]); result.add( mu ); } break; *************** *** 144,150 **** ok = checkModuleDependency ( deps[j], mu.getRemoteModule() ); if ( ok ) { if ( !result.contains( mu ) ) { ! err.log (" ADDED[GROUP]: " + mu.getCodeNameBase () + "[L10N? " + (mu instanceof L10NUpdate) + "]: DEP: " + deps [j]); result.add( mu ); } break; --- 156,166 ---- ok = checkModuleDependency ( deps[j], mu.getRemoteModule() ); if ( ok ) { if ( !result.contains( mu ) ) { ! err.log(Level.FINE, ! " ADDED[GROUP]: " + ! mu.getCodeNameBase() + "[L10N? " + ! (mu instanceof L10NUpdate) + "]: DEP: " + ! deps[j]); result.add( mu ); } break; *************** *** 166,172 **** if ( ok ) { if ( !result.contains( mu ) ) { ! err.log (" ADDED[ALL]: " + mu.getCodeNameBase () + "[L10N? " + (mu instanceof L10NUpdate) + "]: DEP: " + deps [j]); result.add( mu ); } break; --- 182,191 ---- if ( ok ) { if ( !result.contains( mu ) ) { ! err.log(Level.FINE, ! " ADDED[ALL]: " + mu.getCodeNameBase() + ! "[L10N? " + (mu instanceof L10NUpdate) + ! "]: DEP: " + deps[j]); result.add( mu ); } break; *************** *** 199,205 **** ok = checkModuleDependency ( deps[j], mu.getRemoteModule() ); if ( ok ) { if ( !result.contains( mu ) ) { ! err.log (" ADDED[GROUP]: " + mu.getCodeNameBase () + "[L10N? " + (mu instanceof L10NUpdate) + "]: DEP: " + deps [j]); result.add( mu ); } break; --- 218,228 ---- ok = checkModuleDependency ( deps[j], mu.getRemoteModule() ); if ( ok ) { if ( !result.contains( mu ) ) { ! err.log(Level.FINE, ! " ADDED[GROUP]: " + ! mu.getCodeNameBase() + "[L10N? " + ! (mu instanceof L10NUpdate) + "]: DEP: " + ! deps[j]); result.add( mu ); } break; *************** *** 521,527 **** for (int i = 0; ! res && (i < installedModules.length); i++) { res = checkModuleDependency (d, installedModules [i]); } ! err.log ("checkPlatformDependency on module " + module.getCodeNameBase () + " which requires " + d + " returns " + res); } } } --- 544,553 ---- for (int i = 0; ! res && (i < installedModules.length); i++) { res = checkModuleDependency (d, installedModules [i]); } ! err.log(Level.FINE, ! "checkPlatformDependency on module " + ! module.getCodeNameBase() + " which requires " + d + ! " returns " + res); } } } *************** *** 548,554 **** if ( ok ) { if ( !result.contains (lu) ) { ! err.log (" ADDED[SELECTED]: " + lu.getCodeNameBase () + "[" + lu.getLangcode () + "]"); result.add (lu); } break; --- 574,582 ---- if ( ok ) { if ( !result.contains (lu) ) { ! err.log(Level.FINE, ! " ADDED[SELECTED]: " + lu.getCodeNameBase() + ! "[" + lu.getLangcode() + "]"); result.add (lu); } break; *************** *** 568,574 **** if ( ok ) { if ( !result.contains (lu) ) { ! err.log (" ADDED[GROUP]: " + lu.getCodeNameBase () + "[" + lu.getLangcode () + "]"); result.add (lu); } break; --- 596,604 ---- if ( ok ) { if ( !result.contains (lu) ) { ! err.log(Level.FINE, ! " ADDED[GROUP]: " + lu.getCodeNameBase() + ! "[" + lu.getLangcode() + "]"); result.add (lu); } break; *************** *** 589,595 **** if ( ok ) { if ( !result.contains (lu) ) { ! err.log (" ADDED[ALL]: " + lu.getCodeNameBase () + "[" + lu.getLangcode () + "]"); result.add (lu); } break; --- 619,627 ---- if ( ok ) { if ( !result.contains (lu) ) { ! err.log(Level.FINE, ! " ADDED[ALL]: " + lu.getCodeNameBase() + ! "[" + lu.getLangcode() + "]"); result.add (lu); } break; Index: src/org/netbeans/modules/autoupdate/ModuleUpdate.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ModuleUpdate.java Base (1.63) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/ModuleUpdate.java Locally Modified (Based On 1.63) *************** *** 23,28 **** --- 23,30 ---- import java.text.SimpleDateFormat; import java.util.*; import java.util.jar.*; + import java.util.logging.Level; + import java.util.logging.Logger; import java.util.zip.ZipEntry; import java.util.zip.ZipException; import org.openide.DialogDisplayer; *************** *** 224,238 **** documentElement = document.getDocumentElement(); node = documentElement; } catch ( org.xml.sax.SAXException e ) { ! ErrorManager.getDefault ().annotate (e, ErrorManager.UNKNOWN, ! "Bad info : " + nbmFile.getName(), // NOI18N ! getMessage ("ERR_Bad_Info", nbmFile.getName ()), null, null); // NOI18N ErrorManager.getDefault ().notify (ErrorManager.WARNING, e); return null; } catch ( ZipException ze ) { ! ErrorManager.getDefault ().annotate (ze, ErrorManager.ERROR, ! "Corrupted nbm file : " + nbmFile.getName(), // NOI18N ! getMessage ("ERR_Corrupted_Zip", nbmFile.getName ()), null, null); // NOI18N ErrorManager.getDefault ().notify (ErrorManager.WARNING, ze); return null; } catch (UnknownHostException e) { --- 226,245 ---- documentElement = document.getDocumentElement(); node = documentElement; } catch ( org.xml.sax.SAXException e ) { ! ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, ! "Bad info : " + nbmFile.getName(), ! getMessage("ERR_Bad_Info", ! nbmFile.getName()), ! null, null); // NOI18N ErrorManager.getDefault ().notify (ErrorManager.WARNING, e); return null; } catch ( ZipException ze ) { ! ErrorManager.getDefault().annotate(ze, ErrorManager.ERROR, ! "Corrupted nbm file : " + ! nbmFile.getName(), ! getMessage("ERR_Corrupted_Zip", ! nbmFile.getName()), ! null, null); // NOI18N ErrorManager.getDefault ().notify (ErrorManager.WARNING, ze); return null; } catch (UnknownHostException e) { *************** *** 240,254 **** + "Module " + nbmFile.getName() + " will be ommited in the install list."; // NOI18N ErrorManager.getDefault().annotate(e, ErrorManager.EXCEPTION, message, ! getMessage("ERR_Unavailability_Resource", nbmFile.getName()), // NOI18N ! null, ! null); ErrorManager.getDefault().notify(ErrorManager.ERROR, e); return null; } catch ( IOException e ) { ! ErrorManager.getDefault ().annotate (e, ErrorManager.UNKNOWN, ! "Missing info : " + nbmFile.getName (), // NOI18N ! getMessage ("ERR_Missing_Info", nbmFile.getName ()), null, null); // NOI18N ErrorManager.getDefault ().notify (ErrorManager.WARNING, e); return null; } finally { --- 247,264 ---- + "Module " + nbmFile.getName() + " will be ommited in the install list."; // NOI18N ErrorManager.getDefault().annotate(e, ErrorManager.EXCEPTION, message, ! getMessage("ERR_Unavailability_Resource", ! nbmFile.getName()), ! null, null); ErrorManager.getDefault().notify(ErrorManager.ERROR, e); return null; } catch ( IOException e ) { ! ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, ! "Missing info : " + ! nbmFile.getName(), ! getMessage("ERR_Missing_Info", ! nbmFile.getName()), ! null, null); // NOI18N ErrorManager.getDefault ().notify (ErrorManager.WARNING, e); return null; } finally { *************** *** 450,461 **** node = documentElement; } catch ( org.xml.sax.SAXException e ) { ! ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, "Bad info : " + nbmFile.getName(), null, null, null); // NOI18N ErrorManager.getDefault().notify(ErrorManager.WARNING, e); return false; } catch ( IOException e ) { ! ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, "Missing info : " + nbmFile.getName(), null, null, null); // NOI18N ErrorManager.getDefault().notify(ErrorManager.WARNING, e); return false; } --- 460,476 ---- node = documentElement; } catch ( org.xml.sax.SAXException e ) { ! ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, ! "Bad info : " + nbmFile.getName(), ! null, null, null); // NOI18N ErrorManager.getDefault().notify(ErrorManager.WARNING, e); return false; } catch ( IOException e ) { ! ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, ! "Missing info : " + ! nbmFile.getName(), null, null, ! null); // NOI18N ErrorManager.getDefault().notify(ErrorManager.WARNING, e); return false; } *************** *** 1056,1062 **** // licence not found if (name != null) { ! ErrorManager.getDefault().log("[AutoUpdate] warning: no license found with name " + name); } return null; } --- 1071,1079 ---- // licence not found if (name != null) { ! Logger.getAnonymousLogger().log(Level.WARNING, ! "[AutoUpdate] warning: no license found with name " + ! name); } return null; } Index: src/org/netbeans/modules/autoupdate/PreparedModules.java *** /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/PreparedModules.java Base (1.11) --- /doma/jarda/netbeans-src/autoupdate/src/org/netbeans/modules/autoupdate/PreparedModules.java Locally Modified (Based On 1.11) *************** *** 182,196 **** os = new FileOutputStream (installLaterFile); XMLUtil.write(document, os, "UTF-8"); // NOI18N } catch (java.io.FileNotFoundException fnfe) { ! ErrorManager.getDefault ().notify (fnfe); } catch (java.io.IOException ioe) { ! ErrorManager.getDefault ().notify (ioe); } finally { if (os != null) { try { os.close (); } catch (Exception x) { ! ErrorManager.getDefault ().notify (x); } } } --- 182,196 ---- os = new FileOutputStream (installLaterFile); XMLUtil.write(document, os, "UTF-8"); // NOI18N } catch (java.io.FileNotFoundException fnfe) { ! ErrorManager.getDefault().notify(fnfe); } catch (java.io.IOException ioe) { ! ErrorManager.getDefault().notify(ioe); } finally { if (os != null) { try { os.close (); } catch (Exception x) { ! ErrorManager.getDefault().notify(x); } } }