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.design.extra.Process;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.PluginVerifyException; import com.fr.plugin.PluginVerifyException;
import com.fr.plugin.dependence.PluginDependenceException;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -89,6 +90,8 @@ public class InstallOnlineExecutor implements Executor {
}); });
} catch (PluginVerifyException e) { } catch (PluginVerifyException e) {
JOptionPane.showMessageDialog(null, e.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); 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) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} catch (Exception e) { } 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); 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 (choose == 0) {//下载安装
if (!connectToServer()) { 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")); throw new PluginDependenceException(Inter.getLocText("FR-Designer-Dependence_Connect_Server_Error"));
} }
//安装依赖环境 //安装依赖环境
if (install()) { if (install()) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Install_Succeed") + "!!"); JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Install_Succeed") + "!!");
} else { } 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")); throw new PluginDependenceException(Inter.getLocText("FR-Designer-Dependence_Install_Failed"));
} }
}else {//不选择下载,则不安装图标插件 }else {//不选择下载,则不安装图标插件

Loading…
Cancel
Save