/** * @param info * @param menuModel * @param renderer * @param evalContext * @param recurse */ public static void collectInfo(ExpressionInfo info, final MMenu menuModel, final MenuManagerRenderer renderer, final IEclipseContext evalContext, boolean recurse) { HashSet<ContributionRecord> records = new HashSet<ContributionRecord>(); for (MMenuElement element : menuModel.getChildren()) { ContributionRecord record = renderer.getContributionRecord(element); if (record != null) { if (records.add(record)) { record.collectInfo(info); } } else { ContributionsAnalyzer.collectInfo(info, element.getVisibleWhen()); } if (recurse && element instanceof MMenu) { MMenu childMenu = (MMenu) element; collectInfo(info, childMenu, renderer, evalContext, false); } } }
/** * @param info * @param menuModel * @param renderer * @param evalContext * @param recurse */ public static void collectInfo(ExpressionInfo info, final MMenu menuModel, final MenuManagerRenderer renderer, final IEclipseContext evalContext, boolean recurse) { HashSet<ContributionRecord> records = new HashSet<>(); for (MMenuElement element : menuModel.getChildren()) { ContributionRecord record = renderer.getContributionRecord(element); if (record != null) { if (records.add(record)) { record.collectInfo(info); } } else { ContributionsAnalyzer.collectInfo(info, element.getVisibleWhen()); } if (recurse && element instanceof MMenu) { MMenu childMenu = (MMenu) element; collectInfo(info, childMenu, renderer, evalContext, false); } } }
HashSet<ContributionRecord> records = new HashSet<ContributionRecord>(); for (MMenuElement element : menuModel.getChildren()) { ContributionRecord record = renderer.getContributionRecord(element); if (record != null) { if (records.add(record)) {
HashSet<ContributionRecord> records = new HashSet<>(); for (MMenuElement element : menuModel.getChildren()) { ContributionRecord record = renderer.getContributionRecord(element); if (record != null) { if (records.add(record)) {