Browse Source

REPORT-48228 插件实现的插件管理不受shouldShowPlugin限制

feature/big-screen
lucian 4 years ago
parent
commit
202b029269
  1. 17
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

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

@ -489,11 +489,7 @@ public abstract class ToolBarMenuDock {
}
if (!DesignerMode.isAuthorityEditing()) {
if (shouldShowPlugin()) {
menuDef.addShortCut(
createPluginManagerAction()
);
}
addPluginManagerAction(menuDef);
menuDef.addShortCut(
new FunctionManagerAction(),
new GlobalParameterAction()
@ -504,16 +500,21 @@ public abstract class ToolBarMenuDock {
return menuDef;
}
private ShortCut createPluginManagerAction() {
private void addPluginManagerAction(MenuDef menuDef) {
Set<PluginManagerProvider> providers = ExtraDesignClassManager.getInstance().getArray(PluginManagerProvider.MARK_STRING);
if (providers != null) {
for (PluginManagerProvider provider : providers) {
if (provider.selector().accept(new ObjectHolder())) {
return provider.pluginManagerAction();
menuDef.addShortCut(provider.pluginManagerAction());
return;
}
}
}
return new PluginManagerAction();
if (shouldShowPlugin()) {
menuDef.addShortCut(
new PluginManagerAction()
);
}
}
private ShortCut createGlobalTDAction() {

Loading…
Cancel
Save