@Test public void testNavGroupFromContext() throws Exception { when(navigationServices.loadNavTree()).thenReturn(new NavTreeBuilder() .group("groupC", "", "", true) .item("item1", "", "", true, NavWorkbenchCtx.perspective("A")) .endGroup() .group("groupX", "", "", true) .item("item2", "", "", true, NavWorkbenchCtx.perspective("C")) .endGroup() .build()); LayoutRecursionIssue info = layoutTemplateAnalyzer.analyzeRecursion(layoutC, new LayoutTemplateContext("groupX")); assertEquals(info.getRefList().size(), 5); assertEquals(info.getRefList().get(0), new LayoutNavigationRef(PERSPECTIVE, "C")); assertEquals(info.getRefList().get(1), new LayoutNavigationRef(NAV_COMPONENT, TABLIST.getFQClassName())); assertEquals(info.getRefList().get(2), new LayoutNavigationRef(NAV_GROUP_CONTEXT, "groupX")); assertEquals(info.getRefList().get(3), new LayoutNavigationRef(DEFAULT_ITEM_FOUND, "item2")); assertEquals(info.getRefList().get(4), new LayoutNavigationRef(PERSPECTIVE, "C")); }
public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); }
LayoutTemplateAnalyzer { public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); } }
LayoutTemplateAnalyzer { public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); } LayoutTemplateAnalyzer(); @Inject  LayoutTemplateAnalyzer(PerspectivePluginServicesImpl pluginServices, NavigationServicesImpl navigationServices); }
LayoutTemplateAnalyzer { public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); } LayoutTemplateAnalyzer(); @Inject  LayoutTemplateAnalyzer(PerspectivePluginServicesImpl pluginServices, NavigationServicesImpl navigationServices); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutTemplate layoutTemplate, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutRow row, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(NavGroup navGroup, LayoutNavigationRefType navGroupRefType, LayoutRecursionIssue issue); boolean analyzeRecursion(String perspectiveId, LayoutRecursionIssue issue); boolean hasNavigationComponents(LayoutTemplate layoutTemplate); boolean hasNavigationComponents(LayoutRow row); }
LayoutTemplateAnalyzer { public LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate) { return analyzeRecursion(layoutTemplate, null); } LayoutTemplateAnalyzer(); @Inject  LayoutTemplateAnalyzer(PerspectivePluginServicesImpl pluginServices, NavigationServicesImpl navigationServices); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutTemplate layoutTemplate, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutRow row, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(NavGroup navGroup, LayoutNavigationRefType navGroupRefType, LayoutRecursionIssue issue); boolean analyzeRecursion(String perspectiveId, LayoutRecursionIssue issue); boolean hasNavigationComponents(LayoutTemplate layoutTemplate); boolean hasNavigationComponents(LayoutRow row);  }