Browse Source

Merge pull request #225 in BA/design from ~SHINE/design:master to master

* commit 'd57ab06309f99175a6cdd0589b7d1980e3b953ce':
  整理
  read plugin
master
superman 8 years ago
parent
commit
e3b3a0ffee
  1. 6
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

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

@ -58,13 +58,12 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
if (classManager == null) { if (classManager == null) {
classManager = new ChartTypeInterfaceManager(); classManager = new ChartTypeInterfaceManager();
chartTypeInterfaces.clear(); chartTypeInterfaces.clear();
classManager.readXMLFile();
} }
return classManager; return classManager;
} }
static { static {
GeneralContext.addEnvChangedListener(new EnvChangedListener() { GeneralContext.addSwitchEnvListener(new EnvChangedListener() {
public void envChanged() { public void envChanged() {
ChartTypeInterfaceManager.envChanged(); ChartTypeInterfaceManager.envChanged();
} }
@ -85,6 +84,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
} }
public static WidgetOption[] initWidgetOption(){ public static WidgetOption[] initWidgetOption(){
ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames();
ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; ChartWidgetOption[] child = new ChartWidgetOption[typeName.length];
for (int i = 0; i < typeName.length; i++) { for (int i = 0; i < typeName.length; i++) {
@ -141,7 +141,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
public void addChartInterface(String className, String plotID, PluginSimplify simplify) { public void addChartInterface(String className, String plotID, PluginSimplify simplify) {
if (StringUtils.isNotBlank(className)) { if (StringUtils.isNotBlank(className)) {
try { try {
Class<?> clazz = loader.loadClass(className); Class<?> clazz = Class.forName(className);
Authorize authorize = clazz.getAnnotation(Authorize.class); Authorize authorize = clazz.getAnnotation(Authorize.class);
if (authorize != null) { if (authorize != null) {
PluginLicenseManager.getInstance().registerPaid(authorize, simplify); PluginLicenseManager.getInstance().registerPaid(authorize, simplify);

Loading…
Cancel
Save