Browse Source

Merge pull request #955 in BA/design from ~JU/ba-9.0-design:9.0 to 9.0

* commit '02de99bafa20e83871f76c7de46b8aa4b9af88aa':
  PFC-607 插件安装删除更新不重启支持 统一插件相关工具位置
  PFC-607 插件安装删除更新不重启支持 统一插件相关工具位置
  移动国际化到Report
  special level
master
superman 8 years ago
parent
commit
7d5ec24035
  1. 2
      designer_base/src/com/fr/design/ExtraDesignClassManager.java
  2. 2
      designer_base/src/com/fr/design/extra/PluginFromStorePane.java
  3. 4
      designer_base/src/com/fr/design/extra/PluginInstalledPane.java
  4. 2
      designer_base/src/com/fr/design/extra/PluginUpdatePane.java
  5. 14
      designer_base/src/com/fr/design/extra/PluginUtils.java
  6. 3
      designer_base/src/com/fr/design/extra/exe/callback/DownloadCallback.java
  7. 4
      designer_base/src/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java
  8. 3
      designer_base/src/com/fr/design/extra/exe/callback/InstallOnlineCallback.java
  9. 3
      designer_base/src/com/fr/design/extra/exe/callback/ModifyStatusCallback.java
  10. 3
      designer_base/src/com/fr/design/extra/exe/callback/UninstallPluginCallback.java
  11. 4
      designer_base/src/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java
  12. 3
      designer_base/src/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java
  13. 3
      designer_base/src/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java
  14. 3
      designer_base/src/com/fr/design/fun/ExportToolBarProvider.java
  15. 2
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  16. 5
      designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java

2
designer_base/src/com/fr/design/ExtraDesignClassManager.java

@ -16,7 +16,7 @@ import com.fr.general.FRLogger;
import com.fr.general.GeneralUtils;
import com.fr.general.IOUtils;
import com.fr.plugin.AbstractExtraClassManager;
import com.fr.plugin.injectable.CompatibleInjectionContainer;
import com.fr.plugin.solution.closeable.CompatibleInjectionContainer;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.injectable.PluginSingleInjection;
import com.fr.stable.bridge.StableFactory;

2
designer_base/src/com/fr/design/extra/PluginFromStorePane.java

@ -179,7 +179,7 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane<List<Plug
FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Install_Success"));
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Install_Successful"));
} else {
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
} }
});
} catch (Exception e1) {

4
designer_base/src/com/fr/design/extra/PluginInstalledPane.java

@ -69,7 +69,7 @@ public class PluginInstalledPane extends PluginAbstractViewPane {
if (result.isSuccess()) {
JOptionPane.showMessageDialog(null, modifyMessage);
} else {
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
});
@ -80,7 +80,7 @@ public class PluginInstalledPane extends PluginAbstractViewPane {
if (result.isSuccess()) {
JOptionPane.showMessageDialog(null, modifyMessage);
} else {
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null,PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
});

2
designer_base/src/com/fr/design/extra/PluginUpdatePane.java

@ -200,7 +200,7 @@ public class PluginUpdatePane extends PluginAbstractLoadingViewPane<List<PluginV
FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Update_Success"));
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Install_Successful"));
} else {
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
});

14
designer_base/src/com/fr/design/extra/PluginUtils.java

@ -10,6 +10,7 @@ import com.fr.json.JSONObject;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.error.PluginErrorCode;
import com.fr.plugin.view.PluginView;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StableUtils;
@ -29,6 +30,8 @@ import java.util.Map;
* Created by ibm on 2017/5/25.
*/
public class PluginUtils {
private static final String ERROR_CODE_I18N_PREFIX = "FR-Plugin_Error_";
public static PluginMarker createPluginMarker(String pluginInfo) {
@ -160,5 +163,14 @@ public class PluginUtils {
return StringUtils.EMPTY;
}
}
public static String getMessageByErrorCode(PluginErrorCode errorCode) {
return Inter.getLocText(getInterKeyByErrorCode(errorCode));
}
private static String getInterKeyByErrorCode(PluginErrorCode errorCode) {
return ERROR_CODE_I18N_PREFIX + errorCode.getDescription();
}
}

3
designer_base/src/com/fr/design/extra/exe/callback/DownloadCallback.java

@ -1,5 +1,6 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.extra.PluginUtils;
import com.fr.design.extra.exe.extratask.ExtraPluginTask;
import com.fr.general.Inter;
import com.fr.plugin.manage.control.PluginTaskResult;
@ -30,7 +31,7 @@ public class DownloadCallback extends AbstractPluginTaskCallback {
extraPluginTask.doExtraPluginTask();
} else {
jsCallback.execute("failed");
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

4
designer_base/src/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java

@ -1,9 +1,9 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.extra.PluginOperateUtils;
import com.fr.design.extra.PluginUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.error.PluginErrorCode;
import com.fr.plugin.manage.PluginManager;
@ -77,7 +77,7 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
}else {
jsCallback.execute("failed");
FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Install_Failed"));
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

3
designer_base/src/com/fr/design/extra/exe/callback/InstallOnlineCallback.java

@ -1,5 +1,6 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.extra.PluginUtils;
import com.fr.design.extra.PluginOperateUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
@ -78,7 +79,7 @@ public class InstallOnlineCallback extends AbstractPluginTaskCallback {
}else {
jsCallback.execute("failed");
FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Install_Failed"));
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

3
designer_base/src/com/fr/design/extra/exe/callback/ModifyStatusCallback.java

@ -1,5 +1,6 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.extra.PluginUtils;
import com.fr.general.Inter;
import com.fr.plugin.manage.control.PluginTaskCallback;
import com.fr.plugin.manage.control.PluginTaskResult;
@ -24,7 +25,7 @@ public class ModifyStatusCallback implements PluginTaskCallback{
String modifyMessage = isActive ? Inter.getLocText("FR-Designer-Plugin_Disabled") : Inter.getLocText("FR-Designer-Plugin_Actived");
JOptionPane.showMessageDialog(null, modifyMessage);
} else {
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}

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

@ -1,5 +1,6 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.extra.PluginUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.context.PluginMarker;
@ -44,7 +45,7 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback {
} else {
jsCallback.execute("failed");
FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Delete_Failed"));
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

4
designer_base/src/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java

@ -1,9 +1,9 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.extra.PluginOperateUtils;
import com.fr.design.extra.PluginUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.error.PluginErrorCode;
import com.fr.plugin.manage.PluginManager;
@ -77,7 +77,7 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
}else {
jsCallback.execute("failed");
FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Update_Failed"));
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

3
designer_base/src/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java

@ -1,5 +1,6 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.extra.PluginUtils;
import com.fr.design.extra.PluginOperateUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
@ -63,7 +64,7 @@ public class UpdateOnlineCallback extends AbstractPluginTaskCallback {
} else {
jsCallback.execute("failed");
FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Update_Failed"));
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

3
designer_base/src/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java

@ -1,6 +1,7 @@
package com.fr.design.extra.tradition.callback;
import com.fr.design.extra.PluginStatusCheckCompletePane;
import com.fr.design.extra.PluginUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.context.PluginMarker;
@ -49,7 +50,7 @@ public class UpdateOnlineCallback implements ProgressCallback {
PluginManager.getController().update(pluginMarker, toPluginMarker, new UpdateOnlineCallback(pluginMarker, toPluginMarker, pane));
} else {
FRLogger.getLogger().info(Inter.getLocText("FR-Designer-Plugin_Delete_Failed"));
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

3
designer_base/src/com/fr/design/fun/ExportToolBarProvider.java

@ -1,5 +1,6 @@
package com.fr.design.fun;
import com.fr.plugin.injectable.SpecialLevel;
import com.fr.stable.fun.mark.Mutable;
import javax.swing.*;
@ -9,7 +10,7 @@ import javax.swing.*;
*/
public interface ExportToolBarProvider extends Mutable{
String XML_TAG = "ExportToolBarProvider";
String XML_TAG = SpecialLevel.ExportToolBarProvider.getTagName();
int CURRENT_LEVEL = 1;

2
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -32,7 +32,7 @@ import com.fr.plugin.observer.PluginEventListener;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.collections.map.CloseableContainedMap;
import com.fr.plugin.solution.closeable.CloseableContainedMap;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import javax.swing.*;

5
designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java

@ -10,6 +10,7 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.injectable.SpecialLevel;
import com.fr.stable.fun.Level;
/**
@ -19,8 +20,8 @@ import com.fr.stable.fun.Level;
* 自定义图表类型设设计界面接口
*/
public interface IndependentChartUIProvider extends Level {
String XML_TAG = "IndependentChartUIProvider";
String XML_TAG = SpecialLevel.IndependentChartUIProvider.getTagName();
int CURRENT_API_LEVEL = 3;

Loading…
Cancel
Save