|
|
|
@ -32,7 +32,7 @@ import java.util.Map;
|
|
|
|
|
* Created on 2023/5/18 |
|
|
|
|
*/ |
|
|
|
|
public class BatchModifyStatusCallback implements PluginTaskCallback { |
|
|
|
|
private boolean isActive; |
|
|
|
|
private boolean active; |
|
|
|
|
private JSCallback jsCallback = new JSCallback(JSExecutor.DEFAULT); |
|
|
|
|
private Map<String, String> resultMap = new HashMap<>(); |
|
|
|
|
private int pluginCount = 0; |
|
|
|
@ -42,11 +42,11 @@ public class BatchModifyStatusCallback implements PluginTaskCallback {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public BatchModifyStatusCallback(boolean isActive) { |
|
|
|
|
this.isActive = isActive; |
|
|
|
|
this.active = isActive; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public BatchModifyStatusCallback(boolean isActive, JSCallback jsCallback) { |
|
|
|
|
this.isActive = isActive; |
|
|
|
|
this.active = isActive; |
|
|
|
|
this.jsCallback = jsCallback; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -60,7 +60,7 @@ public class BatchModifyStatusCallback implements PluginTaskCallback {
|
|
|
|
|
String pluginInfo = PluginOperateUtils.getSuccessInfo(result); |
|
|
|
|
if (result.isSuccess()) { |
|
|
|
|
successCount++; |
|
|
|
|
String modifyMessage = isActive ? |
|
|
|
|
String modifyMessage = active ? |
|
|
|
|
pluginInfo + Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Been_Disabled_Duplicate") : |
|
|
|
|
pluginInfo + Toolkit.i18nText("Fine-Design_Plugin_Has_Been_Actived_Duplicate"); |
|
|
|
|
FineLoggerFactory.getLogger().info(modifyMessage); |
|
|
|
@ -109,7 +109,7 @@ public class BatchModifyStatusCallback implements PluginTaskCallback {
|
|
|
|
|
*/ |
|
|
|
|
public void showMessageDialog() { |
|
|
|
|
if (failedCount == 0) { |
|
|
|
|
if (isActive) { |
|
|
|
|
if (active) { |
|
|
|
|
FineJOptionPane.showMessageDialog(DesignerPluginContext.getPluginDialog(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Plugin_Batch_Modify_Stop_Success"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Plugin_Stop"), |
|
|
|
@ -126,13 +126,13 @@ public class BatchModifyStatusCallback implements PluginTaskCallback {
|
|
|
|
|
detailPane.updateDetailArea(resultMap.get(key)); |
|
|
|
|
} |
|
|
|
|
detailPane.updateMessage(failedCount, successCount); |
|
|
|
|
detailPane.updateTitle(isActive); |
|
|
|
|
detailPane.updateTitle(active); |
|
|
|
|
detailPane.show(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setActive(boolean active) { |
|
|
|
|
isActive = active; |
|
|
|
|
this.active = active; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|