Browse Source

依赖下载逻辑

master
Fangjie Hu 8 years ago
parent
commit
06832dc1d9
  1. 3
      designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java
  2. 4
      designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java

3
designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java

@ -9,6 +9,7 @@ import com.fr.design.extra.PluginHelper;
import com.fr.design.extra.Process;
import com.fr.general.Inter;
import com.fr.plugin.PluginVerifyException;
import com.fr.plugin.dependence.PluginDependenceException;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -89,6 +90,8 @@ public class InstallOnlineExecutor implements Executor {
});
} catch (PluginVerifyException e) {
JOptionPane.showMessageDialog(null, e.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
} catch (PluginDependenceException e){
JOptionPane.showMessageDialog(null, e.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
} catch (InterruptedException e) {
e.printStackTrace();
} catch (Exception e) {

4
designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java

@ -253,14 +253,14 @@ public class DownLoadDependenceUI implements ActionListener {
int choose = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer-Plugin_Plugin") + Inter.getLocText("FR-Designer-Need") + Inter.getLocText("FR-Designer-Dependence") + Inter.getLocText("FR-Designer-Support") + "," + Inter.getLocText("FR-Designer-Dependence_Need_Install") + "(" + showFileLength() + " m)?", "install tooltip", JOptionPane.YES_NO_OPTION);
if (choose == 0) {//下载安装
if (!connectToServer()) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Connect_Server_Error"), "alert", JOptionPane.ERROR_MESSAGE);
//JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Connect_Server_Error"), "alert", JOptionPane.ERROR_MESSAGE);
throw new PluginDependenceException(Inter.getLocText("FR-Designer-Dependence_Connect_Server_Error"));
}
//安装依赖环境
if (install()) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Install_Succeed") + "!!");
} else {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Install_Failed") + "!!", "alert", JOptionPane.ERROR_MESSAGE);
//JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Install_Failed") + "!!", "alert", JOptionPane.ERROR_MESSAGE);
throw new PluginDependenceException(Inter.getLocText("FR-Designer-Dependence_Install_Failed"));
}
}else {//不选择下载,则不安装图标插件

Loading…
Cancel
Save