From 609ed362ba2b31b893446a46f07c30a27c8f4fba Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 14 Nov 2016 16:39:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E5=88=A0=E9=99=A4=E9=9F=A9=E6=96=87?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E4=B8=8B=E7=9A=84=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/toolbar/ToolBarMenuDock.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index cde400571..2a3fa28d3 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -122,8 +122,6 @@ public abstract class ToolBarMenuDock { ////////////////////////////////////////////////////////////////////////////////////////// public MenuDef[] menus(final ToolBarMenuDockPlus plus) { - Locale locale = FRContext.getLocale(); - java.util.List menuList = new java.util.ArrayList(); // 添加文件菜单 menuList.add(createFileMenuDef(plus)); @@ -140,17 +138,21 @@ public abstract class ToolBarMenuDock { // 添加帮助菜单 menuList.add(createHelpMenuDef()); - // 添加社区菜单 - Locale [] locales =supportCommunityLocales(); - // 添加社区菜单 + addCommunityMenuDef(menuList); + + return menuList.toArray(new MenuDef[menuList.size()]); + } + + public void addCommunityMenuDef(java.util.List menuList){ + Locale locale = FRContext.getLocale(); + Locale [] locales =supportCommunityLocales(); for(int i = 0; i < locales.length; i++) { if(locale.equals(locales[i])){ menuList.add(createCommunityMenuDef()); + break; } } - - return menuList.toArray(new MenuDef[menuList.size()]); } public Locale[] supportCommunityLocales() {