|
|
@ -4,6 +4,8 @@ import com.fr.design.constants.DesignerLaunchStatus; |
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
import com.fr.design.fun.HyperlinkProvider; |
|
|
|
import com.fr.design.fun.HyperlinkProvider; |
|
|
|
import com.fr.design.fun.TableDataDefineProvider; |
|
|
|
import com.fr.design.fun.TableDataDefineProvider; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
|
|
|
|
import com.fr.design.ui.util.UIUtil; |
|
|
|
import com.fr.plugin.observer.PluginEvent; |
|
|
|
import com.fr.plugin.observer.PluginEvent; |
|
|
|
import com.fr.plugin.observer.PluginEventListener; |
|
|
|
import com.fr.plugin.observer.PluginEventListener; |
|
|
|
import com.fr.plugin.observer.PluginEventType; |
|
|
|
import com.fr.plugin.observer.PluginEventType; |
|
|
@ -28,7 +30,7 @@ public class PluginClassRefreshManager { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void on(PluginEvent event) { |
|
|
|
public void on(PluginEvent event) { |
|
|
|
// 重载模版之前 触发下hide
|
|
|
|
// 重载模版之前 触发下hide
|
|
|
|
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTabChange(); |
|
|
|
fireTabChange(); |
|
|
|
// 兼容之前版本特性
|
|
|
|
// 兼容之前版本特性
|
|
|
|
for (String tag : context) { |
|
|
|
for (String tag : context) { |
|
|
|
if (event.getContext().contain(tag)) { |
|
|
|
if (event.getContext().contain(tag)) { |
|
|
@ -53,12 +55,24 @@ public class PluginClassRefreshManager { |
|
|
|
public void on(PluginEvent event) { |
|
|
|
public void on(PluginEvent event) { |
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun, pluginAfterRunEventListener); |
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun, pluginAfterRunEventListener); |
|
|
|
if (DesignerLaunchStatus.getStatus() != DesignerLaunchStatus.WORKSPACE_INIT_COMPLETE) { |
|
|
|
if (DesignerLaunchStatus.getStatus() != DesignerLaunchStatus.WORKSPACE_INIT_COMPLETE) { |
|
|
|
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTabChange(); |
|
|
|
fireTabChange(); |
|
|
|
HistoryTemplateListCache.getInstance().reloadAllEditingTemplate(); |
|
|
|
HistoryTemplateListCache.getInstance().reloadAllEditingTemplate(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void fireTabChange() { |
|
|
|
|
|
|
|
JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
|
|
|
|
if (template != null) { |
|
|
|
|
|
|
|
UIUtil.invokeLaterIfNeeded(new Runnable() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void run() { |
|
|
|
|
|
|
|
template.fireTabChange(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static PluginClassRefreshManager getInstance() { |
|
|
|
public static PluginClassRefreshManager getInstance() { |
|
|
|
return INSTANCE; |
|
|
|
return INSTANCE; |
|
|
|