NavTreeEditor extends NavItemEditor { public NavItemEditorSettings.Flags setNewDividerEnabled(String navItemId, boolean enabled) { return getSettings().setNewDividerEnabled(navItemId, enabled); } @Inject  NavTreeEditor(NavTreeEditorView view,
                         NavigationManager navigationManager,
                         SyncBeanManager beanManager,
                         PlaceManager placeManager,
                         PerspectiveTreeProvider perspectiveTreeProvider,
                         TargetPerspectiveEditor targetPerspectiveEditor,
                         PerspectivePluginManager perspectivePluginManager,
                         Event<NavItemEditStartedEvent> navItemEditStartedEvent,
                         Event<NavItemEditCancelledEvent> navItemEditCancelledEvent,
                         LoadingBox loadingBox); void setOnSaveCommand(Command onSaveCommand); @Override String getGroupLiteral(); NavTree getNavTree(); void edit(NavTree navTree); void newTree(); NavItemEditorSettings setMaxLevels(String navItemId, int maxLevels); NavItemEditorSettings.Flags setNewGroupEnabled(String navItemId, boolean enabled); NavItemEditorSettings.Flags setNewPerspectiveEnabled(String navItemId, boolean enabled); NavItemEditorSettings.Flags setNewDividerEnabled(String navItemId, boolean enabled); NavItemEditorSettings.Flags setOnlyRuntimePerspectives(String navItemId, boolean enabled); NavItemEditorSettings.Flags setPerspectiveContextEnabled(String navItemId, boolean enabled); static final NavigationConstants i18n; static final String ROOT_GROUP_ID; }
@Test public void testNewDividerEnabled() { navTreeEditor.getSettings().setNewDividerEnabled(true); assertTrue(navTreeEditor.getSettings().isNewDividerEnabled(NAV_TREE.getItemById("level1b"))); navTreeEditor.setNewDividerEnabled("level1b", false); assertFalse(navTreeEditor.getSettings().isNewDividerEnabled(NAV_TREE.getItemById("level1b"))); assertTrue(navTreeEditor.getSettings().isNewDividerEnabled(NAV_TREE.getItemById("level2b"))); navTreeEditor.setNewDividerEnabled("level1b", false).applyToAllChildren(); assertFalse(navTreeEditor.getSettings().isNewDividerEnabled(NAV_TREE.getItemById("level1b"))); assertFalse(navTreeEditor.getSettings().isNewDividerEnabled(NAV_TREE.getItemById("level2b"))); }