|
|
@ -40,7 +40,6 @@ import java.awt.event.MouseEvent; |
|
|
|
import java.awt.event.MouseListener; |
|
|
|
import java.awt.event.MouseListener; |
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.JDialog; |
|
|
|
import javax.swing.JDialog; |
|
|
@ -155,7 +154,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { |
|
|
|
detailsComponents = new Component[][]{{jarCheckTitleLabel}, {jarCheckResultLabel}, {affectedFunctionsLabel}, {affectedFunctionsDetailsPane}, {pluginCheckTitleLabel}, {pluginsCheckResultPanel}}; |
|
|
|
detailsComponents = new Component[][]{{jarCheckTitleLabel}, {jarCheckResultLabel}, {affectedFunctionsLabel}, {affectedFunctionsDetailsPane}, {pluginCheckTitleLabel}, {pluginsCheckResultPanel}}; |
|
|
|
hideAffectedFunctionsComponents = new Component[][]{{jarCheckTitleLabel}, {jarCheckResultLabel}, {affectedFunctionsLabel}, {pluginCheckTitleLabel}, {pluginsCheckResultPanel}}; |
|
|
|
hideAffectedFunctionsComponents = new Component[][]{{jarCheckTitleLabel}, {jarCheckResultLabel}, {affectedFunctionsLabel}, {pluginCheckTitleLabel}, {pluginsCheckResultPanel}}; |
|
|
|
if (noExistServiceDescription.size() > 0 && !ComparatorUtils.equals(remoteBranch, localBranch)) { |
|
|
|
if (noExistServiceDescription.size() > 0 && !ComparatorUtils.equals(remoteBranch, localBranch)) { |
|
|
|
detailsRowSize = new double[]{p, p, p, p,p,p}; |
|
|
|
detailsRowSize = new double[]{p, p, p, p, p, p}; |
|
|
|
detailsInnerPane = TableLayoutHelper.createTableLayoutPane(detailsComponents, detailsRowSize, detailsColumnSize); |
|
|
|
detailsInnerPane = TableLayoutHelper.createTableLayoutPane(detailsComponents, detailsRowSize, detailsColumnSize); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
detailsRowSize = new double[]{p, p, 0, 0, p, p}; |
|
|
|
detailsRowSize = new double[]{p, p, 0, 0, p, p}; |
|
|
@ -330,32 +329,36 @@ public class CheckServiceDialog extends JDialog implements ActionListener { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onDownloadSuccess() { |
|
|
|
public void onDownloadSuccess() { |
|
|
|
deleteForDesignerUpdate(installLib); |
|
|
|
deleteForDesignerUpdate(installLib); |
|
|
|
//主jar下载成功之后再卸载安装插件
|
|
|
|
if (differentPlugins.size() > 0) { |
|
|
|
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); |
|
|
|
//主jar下载成功之后再卸载安装插件
|
|
|
|
progressBar.setValue(0); |
|
|
|
new SwingWorker<JSONArray, Void>() { |
|
|
|
new SwingWorker<JSONArray, Void>() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected JSONArray doInBackground() { |
|
|
|
protected JSONArray doInBackground() { |
|
|
|
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); |
|
|
|
return VersionCheckUtils.syncPlugins(differentPlugins); |
|
|
|
progressBar.setValue(0); |
|
|
|
} |
|
|
|
return VersionCheckUtils.syncPlugins(differentPlugins); |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected void done() { |
|
|
|
|
|
|
|
progressBar.setVisible(false); |
|
|
|
|
|
|
|
JSONArray syncFailedPlugins = null; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
syncFailedPlugins = get(); |
|
|
|
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().error(ex.getMessage(), ex); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (syncFailedPlugins != null && syncFailedPlugins.size() > 0) { |
|
|
|
|
|
|
|
SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(), syncFailedPlugins); |
|
|
|
@Override |
|
|
|
syncFailedPluginsDialog.setVisible(true); |
|
|
|
protected void done() { |
|
|
|
|
|
|
|
progressBar.setVisible(false); |
|
|
|
|
|
|
|
JSONArray syncFailedPlugins = null; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
syncFailedPlugins = get(); |
|
|
|
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().error(ex.getMessage(), ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (syncFailedPlugins != null && syncFailedPlugins.size() > 0) { |
|
|
|
|
|
|
|
SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(), syncFailedPlugins); |
|
|
|
|
|
|
|
syncFailedPluginsDialog.setVisible(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
helper.restartForUpdate(frame); |
|
|
|
} |
|
|
|
} |
|
|
|
helper.restartForUpdate(frame); |
|
|
|
}.execute(); |
|
|
|
} |
|
|
|
} else { |
|
|
|
}.execute(); |
|
|
|
helper.restartForUpdate(frame); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -369,12 +372,12 @@ public class CheckServiceDialog extends JDialog implements ActionListener { |
|
|
|
}.execute(); |
|
|
|
}.execute(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//到这边说明主jar是一致的,就只尝试同步插件
|
|
|
|
//到这边说明主jar是一致的,就只尝试同步插件
|
|
|
|
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); |
|
|
|
|
|
|
|
progressBar.setValue(0); |
|
|
|
|
|
|
|
new SwingWorker<JSONArray, Void>() { |
|
|
|
new SwingWorker<JSONArray, Void>() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected JSONArray doInBackground() { |
|
|
|
protected JSONArray doInBackground() { |
|
|
|
|
|
|
|
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); |
|
|
|
|
|
|
|
progressBar.setValue(0); |
|
|
|
return VersionCheckUtils.syncPlugins(differentPlugins); |
|
|
|
return VersionCheckUtils.syncPlugins(differentPlugins); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|