Browse Source

REPORT-2354 一些交互问题

master
kerry 8 years ago
parent
commit
c40f3371cd
  1. 22
      designer_base/src/com/fr/design/extra/PluginOperateUtils.java
  2. 2
      designer_base/src/com/fr/design/extra/exe/callback/UninstallPluginCallback.java

22
designer_base/src/com/fr/design/extra/PluginOperateUtils.java

@ -296,21 +296,17 @@ public class PluginOperateUtils {
&& StringUtils.isNotEmpty(pluginView.getEnvVersion());
}
public static String getSuccessInfo(PluginTaskResult result){
public static String getSuccessInfo(PluginTaskResult result) {
StringBuilder pluginInfo = new StringBuilder();
PluginTask currentTask = result.getCurrentTask();
PluginContext context = PluginManager.getContext(currentTask.getMarker());
if(context != null){
pluginInfo.append(context.getName());
}
List<PluginTaskResult> pluginTaskResults = result.asList();
for(PluginTaskResult pluginTaskResult : pluginTaskResults){
List<PluginTask> pluginTasks = pluginTaskResult.getPreTasks();
for(PluginTask pluginTask : pluginTasks){
PluginContext pluginContext = PluginManager.getContext(pluginTask.getMarker());
if(pluginContext != null){
pluginInfo.append(pluginContext.getName());
}
for (PluginTaskResult pluginTaskResult : pluginTaskResults) {
if(pluginInfo.length() != 0){
pluginInfo.append("、");
}
PluginTask pluginTask = pluginTaskResult.getCurrentTask();
PluginContext pluginContext = PluginManager.getContext(pluginTask.getMarker());
if (pluginContext != null) {
pluginInfo.append(pluginContext.getName());
}
}
return pluginInfo.toString();

2
designer_base/src/com/fr/design/extra/exe/callback/UninstallPluginCallback.java

@ -27,7 +27,7 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback {
jsCallback.execute("success");
FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Delete_Success"));
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Delete_Success"));
}else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) {
}else if (result.errorCode() == PluginErrorCode.NeedUninstallDependingPluginFirst) {
int rv = JOptionPane.showOptionDialog(
null,
Inter.getLocText(Inter.getLocText("FR-Designer-Plugin_Delete_Dependence")),

Loading…
Cancel
Save