|
|
|
@ -39,24 +39,14 @@ public class PluginClassRefreshManager {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static PluginClassRefreshManager getInstance() { |
|
|
|
|
return INSTANCE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void load() { |
|
|
|
|
context.add(TableDataDefineProvider.XML_TAG); |
|
|
|
|
context.add(HyperlinkProvider.XML_TAG); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private PluginClassRefreshManager() { |
|
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.BeforeAllActive, new PluginEventListener() { |
|
|
|
|
private final PluginEventListener beforeAllPluginActive = new PluginEventListener() { |
|
|
|
|
@Override |
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
removePluginListener(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterAllActive, new PluginEventListener() { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
private final PluginEventListener afterAllPluginsActive = new PluginEventListener() { |
|
|
|
|
@Override |
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
addPluginListener(); |
|
|
|
@ -64,15 +54,33 @@ public class PluginClassRefreshManager {
|
|
|
|
|
HistoryTemplateListCache.getInstance().reloadAllEditingTemplate(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static PluginClassRefreshManager getInstance() { |
|
|
|
|
return INSTANCE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void load() { |
|
|
|
|
context.add(TableDataDefineProvider.XML_TAG); |
|
|
|
|
context.add(HyperlinkProvider.XML_TAG); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private PluginClassRefreshManager() { |
|
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.BeforeAllActive, beforeAllPluginActive); |
|
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterAllActive, afterAllPluginsActive); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void removePluginListener() { |
|
|
|
|
PluginListenerRegistration.getInstance().stopListen(this.pluginAfterRunEventListener); |
|
|
|
|
PluginListenerRegistration.getInstance().stopListen(this.beforeAllPluginActive); |
|
|
|
|
PluginListenerRegistration.getInstance().stopListen(this.afterAllPluginsActive); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void addPluginListener() { |
|
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun, this.pluginAfterRunEventListener); |
|
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.BeforeAllActive, beforeAllPluginActive); |
|
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterAllActive, afterAllPluginsActive); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|