Browse Source

REPORT-53601 & REPORT-53614 结果文本框框设置不可编辑。进度条更新设置

feature/10.0
pengda 4 years ago
parent
commit
7edab03d09
  1. 59
      designer-base/src/main/java/com/fr/env/CheckServiceDialog.java
  2. 1
      designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java

59
designer-base/src/main/java/com/fr/env/CheckServiceDialog.java vendored

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

1
designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java vendored

@ -77,6 +77,7 @@ public class SyncFailedPluginsDialog extends JDialog {
detailsText.append(plugin.getString("name")).append(",").append(Toolkit.i18nText("Fine-Design_Basic_Sync_Server_Version")).append(plugin.getString("version")).append("\n");
}
detailsTextArea.setText(detailsText.toString());
detailsTextArea.setEditable(false);
scrollPane = new JScrollPane(detailsTextArea);
centerPanel.add(detailsTitlePanel,BorderLayout.NORTH);
centerPanel.add(scrollPane,BorderLayout.CENTER);

Loading…
Cancel
Save