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