Lines 47-57
Link Here
|
47 |
import java.io.*; |
47 |
import java.io.*; |
48 |
import java.lang.ref.Reference; |
48 |
import java.lang.ref.Reference; |
49 |
import java.lang.ref.WeakReference; |
49 |
import java.lang.ref.WeakReference; |
|
|
50 |
import java.lang.reflect.Method; |
50 |
import java.security.KeyStore; |
51 |
import java.security.KeyStore; |
51 |
import java.security.KeyStoreException; |
52 |
import java.security.KeyStoreException; |
52 |
import java.security.NoSuchAlgorithmException; |
53 |
import java.security.NoSuchAlgorithmException; |
53 |
import java.security.cert.Certificate; |
54 |
import java.security.cert.Certificate; |
54 |
import java.security.cert.CertificateException; |
55 |
import java.security.cert.CertificateException; |
|
|
56 |
import java.text.MessageFormat; |
55 |
import java.text.ParseException; |
57 |
import java.text.ParseException; |
56 |
import java.text.SimpleDateFormat; |
58 |
import java.text.SimpleDateFormat; |
57 |
import java.util.*; |
59 |
import java.util.*; |
Lines 65-73
Link Here
|
65 |
import org.netbeans.api.autoupdate.UpdateElement; |
67 |
import org.netbeans.api.autoupdate.UpdateElement; |
66 |
import org.netbeans.api.autoupdate.UpdateManager; |
68 |
import org.netbeans.api.autoupdate.UpdateManager; |
67 |
import org.netbeans.api.autoupdate.UpdateUnit; |
69 |
import org.netbeans.api.autoupdate.UpdateUnit; |
68 |
import org.netbeans.core.startup.AutomaticDependencies; |
|
|
69 |
import org.netbeans.core.startup.Main; |
70 |
import org.netbeans.core.startup.TopLogging; |
71 |
import org.netbeans.modules.autoupdate.updateprovider.DummyModuleInfo; |
70 |
import org.netbeans.modules.autoupdate.updateprovider.DummyModuleInfo; |
72 |
import org.netbeans.modules.autoupdate.updateprovider.InstalledModuleProvider; |
71 |
import org.netbeans.modules.autoupdate.updateprovider.InstalledModuleProvider; |
73 |
import org.netbeans.modules.autoupdate.updateprovider.UpdateItemImpl; |
72 |
import org.netbeans.modules.autoupdate.updateprovider.UpdateItemImpl; |
Lines 700-709
Link Here
|
700 |
Collection<UpdateElement> recommended, |
699 |
Collection<UpdateElement> recommended, |
701 |
boolean avoidRecommended) { |
700 |
boolean avoidRecommended) { |
702 |
Set<Dependency> res = new HashSet<Dependency> (); |
701 |
Set<Dependency> res = new HashSet<Dependency> (); |
703 |
AutomaticDependencies.Report rep = AutomaticDependencies.getDefault().refineDependenciesAndReport(el.getCodeName(), original); |
|
|
704 |
if (rep.isModified()) { |
705 |
err.fine(rep.toString()); |
706 |
} |
707 |
for (Dependency dep : original) { |
702 |
for (Dependency dep : original) { |
708 |
if (Dependency.TYPE_RECOMMENDS == dep.getType() && avoidRecommended) { |
703 |
if (Dependency.TYPE_RECOMMENDS == dep.getType() && avoidRecommended) { |
709 |
continue; |
704 |
continue; |
Lines 983-989
Link Here
|
983 |
public static String getProductVersion () { |
978 |
public static String getProductVersion () { |
984 |
if (productVersion == null) { |
979 |
if (productVersion == null) { |
985 |
String buildNumber = System.getProperty ("netbeans.buildnumber"); // NOI18N |
980 |
String buildNumber = System.getProperty ("netbeans.buildnumber"); // NOI18N |
986 |
productVersion = NbBundle.getMessage (TopLogging.class, "currentVersion", buildNumber); // NOI18N |
981 |
ResourceBundle b = NbBundle.getBundle("org.netbeans.core.startup.Bundle"); // NOI18N |
|
|
982 |
productVersion = MessageFormat.format(b.getString("currentVersion"), buildNumber); // NOI18N |
987 |
} |
983 |
} |
988 |
return productVersion; |
984 |
return productVersion; |
989 |
} |
985 |
} |
Lines 1097-1103
Link Here
|
1097 |
} |
1093 |
} |
1098 |
|
1094 |
|
1099 |
public static boolean isKitModule (ModuleInfo mi) { |
1095 |
public static boolean isKitModule (ModuleInfo mi) { |
1100 |
return Main.getModuleSystem().isShowInAutoUpdateClient(mi); |
1096 |
try { |
|
|
1097 |
ClassLoader l = Lookup.getDefault().lookup(ClassLoader.class); |
1098 |
if (l == null) { |
1099 |
l = Thread.currentThread().getContextClassLoader(); |
1100 |
} |
1101 |
if (l == null) { |
1102 |
l = InstallManager.class.getClassLoader(); |
1103 |
} |
1104 |
Class<?> m = Class.forName("org.netbeans.core.startup.Main", true, l); |
1105 |
Method reg = m.getMethod("getModuleSystem"); |
1106 |
Object ms = reg.invoke(null); |
1107 |
Method show = ms.getClass().getMethod("isShowInAutoUpdateClient", ModuleInfo.class); |
1108 |
return (Boolean)show.invoke(ms, mi); |
1109 |
} catch (Exception ex) { |
1110 |
Exceptions.printStackTrace(ex); |
1111 |
return false; |
1112 |
} |
1101 |
} |
1113 |
} |
1102 |
|
1114 |
|
1103 |
public static boolean isEssentialModule (ModuleInfo mi) { |
1115 |
public static boolean isEssentialModule (ModuleInfo mi) { |