Browse Source

插件依赖

master
Fangjie Hu 8 years ago
parent
commit
05252c0031
  1. 3
      designer_base/src/com/fr/design/extra/PluginHelper.java
  2. 6
      designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java

3
designer_base/src/com/fr/design/extra/PluginHelper.java

@ -126,6 +126,9 @@ public class PluginHelper {
//将所有未配置好的资源文件依赖准备好
private static void checkDependenceEnv(Plugin plugin) {
PluginDependence dependence = plugin.getDependence();
if (dependence == null){
return;
}
List<PluginDependenceUnit> list = dependence.getDependPlugins();
for (int i = 0;list != null && i < list.size(); i++){
PluginDependenceUnit preDependence = list.get(i);

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

@ -211,7 +211,7 @@ public class DownLoadDependenceUI implements ActionListener {
}
public boolean preOnline() {
int choose = JOptionPane.showConfirmDialog(null, "新图表需要" + ID + "支持。是否需要安装" + ID + "(" + totalSize/Math.pow(10, 6) + " m)?", "install tooltip", JOptionPane.YES_NO_OPTION);
int choose = JOptionPane.showConfirmDialog(null, "新图表需要" + ID + "支持。是否需要安装" + ID + "(" + showFileLength() + " m)?", "install tooltip", JOptionPane.YES_NO_OPTION);
if (choose == 0){//下载安装
if (!connectToServer()){
JOptionPane.showMessageDialog(null, "无法连接远程服务器!!", "警告", JOptionPane.ERROR_MESSAGE);
@ -229,4 +229,8 @@ public class DownLoadDependenceUI implements ActionListener {
return true;
}
}
private String showFileLength() {
return totalSize == -1 ? "NAN" : totalSize/Math.pow(10, 6) + "";
}
}

Loading…
Cancel
Save