Browse Source

REPORT-53785 切换工作目录后更新本地组件库

feature/10.0
kuangshuai 4 years ago
parent
commit
fc96c6bb71
  1. 15
      designer-realize/src/main/java/com/fr/design/share/SharableManager.java

15
designer-realize/src/main/java/com/fr/design/share/SharableManager.java

@ -9,15 +9,21 @@ import com.fr.design.mainframe.share.collect.ComponentCollector;
import com.fr.design.mainframe.share.collect.SharableCollectorManager; import com.fr.design.mainframe.share.collect.SharableCollectorManager;
import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptSelectionClipboardHandler; import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptSelectionClipboardHandler;
import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptTransferableClipboardHandler; import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptTransferableClipboardHandler;
import com.fr.design.mainframe.share.ui.block.LocalWidgetBlock;
import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane;
import com.fr.design.mainframe.share.util.ShareComponentUtils; import com.fr.design.mainframe.share.util.ShareComponentUtils;
import com.fr.design.share.utils.EffectItemUtils; import com.fr.design.share.utils.EffectItemUtils;
import com.fr.form.share.ShareLoader;
import com.fr.general.GeneralContext;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
import com.fr.stable.EnvChangedListener;
import java.util.List; import java.util.List;
public class SharableManager { public class SharableManager {
public static void start() { public static void start() {
SharableCollectorManager.getInstance().execute(); SharableCollectorManager.getInstance().execute();
listenEnv();
ClipboardFilter.registerClipboardHandler(EncryptSelectionClipboardHandler.getInstance()); ClipboardFilter.registerClipboardHandler(EncryptSelectionClipboardHandler.getInstance());
ClipboardFilter.registerClipboardHandler(EncryptTransferableClipboardHandler.getInstance()); ClipboardFilter.registerClipboardHandler(EncryptTransferableClipboardHandler.getInstance());
} }
@ -44,4 +50,13 @@ public class SharableManager {
} }
} }
} }
private static void listenEnv() {
GeneralContext.addEnvChangedListenerToLast(new EnvChangedListener() {
@Override
public void envChanged() {
LocalWidgetRepoPane.getInstance().refreshPane();
}
});
}
} }

Loading…
Cancel
Save