|
|
|
@ -43,25 +43,21 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
|
|
|
|
|
FineLoggerFactory.getLogger().info(successInfo); |
|
|
|
|
FineJOptionPane.showMessageDialog(null, successInfo); |
|
|
|
|
} else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) { |
|
|
|
|
int rv = FineJOptionPane.showOptionDialog( |
|
|
|
|
int rv = FineJOptionPane.showConfirmDialog( |
|
|
|
|
null, |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Dependence"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), |
|
|
|
|
FineJOptionPane.YES_NO_CANCEL_OPTION, |
|
|
|
|
FineJOptionPane.INFORMATION_MESSAGE, |
|
|
|
|
null, |
|
|
|
|
FineJOptionPane.OPTION_YES_NO_CANCEL, |
|
|
|
|
null |
|
|
|
|
FineJOptionPane.OK_CANCEL_OPTION, |
|
|
|
|
FineJOptionPane.INFORMATION_MESSAGE |
|
|
|
|
); |
|
|
|
|
if (rv == FineJOptionPane.NO_OPTION || rv == FineJOptionPane.CANCEL_OPTION || rv == FineJOptionPane.CLOSED_OPTION) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
List<PluginTask> pluginTasks = result.getPreTasks(); |
|
|
|
|
for(PluginTask pluginTask : pluginTasks){ |
|
|
|
|
PluginMarker marker = pluginTask.getMarker(); |
|
|
|
|
PluginOperateUtils.updatePluginOnline(marker, jsCallback); |
|
|
|
|
if (rv == FineJOptionPane.OK_OPTION) { |
|
|
|
|
List<PluginTask> pluginTasks = result.getPreTasks(); |
|
|
|
|
for(PluginTask pluginTask : pluginTasks){ |
|
|
|
|
PluginMarker marker = pluginTask.getMarker(); |
|
|
|
|
PluginOperateUtils.updatePluginOnline(marker, jsCallback); |
|
|
|
|
} |
|
|
|
|
PluginManager.getController().update(zipFile, new UpdateFromDiskCallback(zipFile, jsCallback)); |
|
|
|
|
} |
|
|
|
|
PluginManager.getController().update(zipFile, new UpdateFromDiskCallback(zipFile, jsCallback)); |
|
|
|
|
} else if(result.errorCode() == PluginErrorCode.NoPluginToUpdate){ |
|
|
|
|
int rv = FineJOptionPane.showOptionDialog( |
|
|
|
|
null, |
|
|
|
|