|
|
|
@ -9,7 +9,6 @@ import com.fr.design.selection.QuickEditor;
|
|
|
|
|
import com.fr.design.ui.util.UIUtil; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.start.common.DesignerStartupPool; |
|
|
|
|
|
|
|
|
|
import javax.swing.Action; |
|
|
|
|
import javax.swing.KeyStroke; |
|
|
|
@ -20,7 +19,6 @@ import java.util.Arrays;
|
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.concurrent.CompletableFuture; |
|
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
|
import java.util.concurrent.ConcurrentMap; |
|
|
|
|
import java.util.concurrent.CopyOnWriteArraySet; |
|
|
|
@ -84,10 +82,12 @@ public class ActionFactory {
|
|
|
|
|
public static void registerAsyncInitCellEditorClass(Class keyClazz, Class<? extends QuickEditor> editorClazz) { |
|
|
|
|
|
|
|
|
|
cellEditorClass.put(keyClazz, editorClazz); |
|
|
|
|
CompletableFuture.runAsync(() -> { |
|
|
|
|
UIUtil.invokeAndWaitIfNeeded(new Runnable() { |
|
|
|
|
// 这里直接用 invokeLater 放到 UI 线程中去调用。
|
|
|
|
|
// 不阻塞主逻辑的启动
|
|
|
|
|
UIUtil.invokeLaterIfNeeded(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
QuickEditor quickEditor = editorClazz.newInstance(); |
|
|
|
|
cellEditorClass.remove(keyClazz); |
|
|
|
@ -97,7 +97,6 @@ public class ActionFactory {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, DesignerStartupPool.designer()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|