|
|
|
@ -52,6 +52,7 @@ import java.util.Map;
|
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.concurrent.CountDownLatch; |
|
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author pengda |
|
|
|
@ -95,9 +96,15 @@ public class VersionCheckUtils {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void showVersionCheckDialog(String envName) { |
|
|
|
|
if (!VersionCheckUtils.versionCheck(envName)) { |
|
|
|
|
showNotificationDialog(envName); |
|
|
|
|
} |
|
|
|
|
new SwingWorker<Void, Void>() { |
|
|
|
|
@Override |
|
|
|
|
protected Void doInBackground() throws Exception { |
|
|
|
|
if (!VersionCheckUtils.versionCheck(envName)) { |
|
|
|
|
showNotificationDialog(envName); |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
}.execute(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void showNotificationDialog(String envName) { |
|
|
|
@ -294,7 +301,7 @@ public class VersionCheckUtils {
|
|
|
|
|
|
|
|
|
|
private static boolean isPluginNeedIgnore(JSONObject remotePlugin) { |
|
|
|
|
return ComparatorUtils.equals(remotePlugin.getString(RUNNING), "false") || (remotePlugin.containsKey(SYNC) && !remotePlugin.getBoolean(SYNC)) |
|
|
|
|
|| (remotePlugin.containsKey(GROUP) && ComparatorUtils.equals(remotePlugin.containsKey(GROUP), BI) || remotePlugin.getString(ID).startsWith(BIPREFIX) |
|
|
|
|
|| (remotePlugin.containsKey(GROUP) && ComparatorUtils.equals(remotePlugin.getString(GROUP), BI) || remotePlugin.getString(ID).startsWith(BIPREFIX) |
|
|
|
|
|| pluginsNeedIgnore.contains(remotePlugin.getString(ID))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|