use of com.biglybt.ui.common.util.MenuItemManager in project BiglyBT by BiglySoftware.
the class PluginsMenuHelper method buildToolsMenu.
public static boolean buildToolsMenu(Menu toolsMenu) {
MenuItemManager menuItemManager = MenuItemManager.getInstance();
com.biglybt.pif.ui.menus.MenuItem[] plugin_items = menuItemManager.getAllAsArray(MenuManager.MENU_MENUBAR_TOOLS);
if (plugin_items.length > 0) {
sort(plugin_items);
MenuBuildUtils.addPluginMenuItems(plugin_items, toolsMenu, true, true, MenuBuildUtils.BASIC_MENU_ITEM_CONTROLLER);
}
return false;
}
use of com.biglybt.ui.common.util.MenuItemManager in project BiglyBT by BiglySoftware.
the class PluginsMenuHelper method buildViewMenu.
public static boolean buildViewMenu(Menu viewMenu) {
int itemCount = viewMenu.getItemCount();
MenuItemManager menuItemManager = MenuItemManager.getInstance();
com.biglybt.pif.ui.menus.MenuItem[] plugin_items = menuItemManager.getAllAsArray(MenuManager.MENU_MENUBAR);
if (plugin_items.length > 0) {
sort(plugin_items);
MenuBuildUtils.addPluginMenuItems(plugin_items, viewMenu, true, true, MenuBuildUtils.BASIC_MENU_ITEM_CONTROLLER);
}
List<UISWTViewBuilderCore> mainViewBuilders = getMainViewBuilder(ViewManagerSWT.getInstance());
if (plugin_items.length > 0 && mainViewBuilders.size() > 0) {
new MenuItem(viewMenu, SWT.SEPARATOR);
}
createViewInfoMenuItems(viewMenu, mainViewBuilders);
if (viewMenu.getItemCount() > itemCount) {
MenuFactory.addSeparatorMenuItem(viewMenu);
}
MenuItem menu_plugin_logViews = MenuFactory.addLogsViewMenuItem(viewMenu);
ViewManagerSWT vi = ViewManagerSWT.getInstance();
List<UISWTViewBuilderCore> logViewBuilders = getLogViewBuilders(vi);
createViewInfoMenuItems(menu_plugin_logViews.getMenu(), logViewBuilders);
return viewMenu.getItemCount() > itemCount;
}
Aggregations