Browse Source

Pull request #1687: REPORT-32068 设计器启动黑屏,出现一次,重启后正常

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'a3bdecfbec98b0c101da38f5b3aab6e1c461093c':
  REPORT-32068 设计器启动黑屏,出现一次,重启后正常
feature/big-screen
Hades 5 years ago
parent
commit
579ceabeb2
  1. 17
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

17
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -11,6 +11,7 @@ import com.fr.design.gui.ibutton.UIButtonUI;
import com.fr.design.gui.icontainer.UIEastResizableContainer;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.general.FRFont;
@ -150,12 +151,18 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void on(PluginEvent event) {
PluginContext context = event.getContext();
PluginRuntime runtime = context.getRuntime();
Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG);
final Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG);
// UI相关的逻辑 用UI线程执行 不走FinePluginController线程 走FinePluginController线程有几率出问题
// 容易导致FinePluginController持有Swing内部的java.awt.Component$AWTTreeLock 这个锁不能被UI线程之外的线程持有 否则容易造成UI线程被Blocked住
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
for (PropertyItemPaneProvider provider : providers) {
addPropertyItem(provider);
}
updateAllPropertyPane();
}
}); }
}, filter);
PluginListenerRegistration.getInstance().listen(
PluginEventType.BeforeStop,
@ -164,13 +171,17 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void on(PluginEvent event) {
PluginContext context = event.getContext();
PluginRuntime runtime = context.getRuntime();
Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG);
final Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG);
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
for (PropertyItemPaneProvider provider : providers) {
removePropertyItem(provider);
}
updateAllPropertyPane();
}
});
}
}, filter);
}

Loading…
Cancel
Save