@Test @SuppressWarnings("unchecked") public void getMenuItemsWithoutProjectSynchronizesEnabledState() { menu.getMenuItemsWithoutProject(); verify( handler, times( 1 ) ).acceptContext( any( Callback.class ) ); }
public List<MenuItem> getMenuItemsWithoutProject() { enableMenuItemsForContext(); if ( projectMenuItem != null && items.contains( projectMenuItem ) ) { return items.subList( 1, items.size() ); } else { return items; } }
NewResourcesMenu implements WorkspaceProjectContextChangeHandler { public List<MenuItem> getMenuItemsWithoutProject() { enableMenuItemsForContext(); if ( projectMenuItem != null && items.contains( projectMenuItem ) ) { return items.subList( 1, items.size() ); } else { return items; } } }
NewResourcesMenu implements WorkspaceProjectContextChangeHandler { public List<MenuItem> getMenuItemsWithoutProject() { enableMenuItemsForContext(); if ( projectMenuItem != null && items.contains( projectMenuItem ) ) { return items.subList( 1, items.size() ); } else { return items; } } NewResourcesMenu(); @Inject  NewResourcesMenu( final SyncBeanManager iocBeanManager,
                             final NewResourcePresenter newResourcePresenter,
                             final WorkspaceProjectContext projectContext ); }
NewResourcesMenu implements WorkspaceProjectContextChangeHandler { public List<MenuItem> getMenuItemsWithoutProject() { enableMenuItemsForContext(); if ( projectMenuItem != null && items.contains( projectMenuItem ) ) { return items.subList( 1, items.size() ); } else { return items; } } NewResourcesMenu(); @Inject  NewResourcesMenu( final SyncBeanManager iocBeanManager,
                             final NewResourcePresenter newResourcePresenter,
                             final WorkspaceProjectContext projectContext ); @PostConstruct void setup(); List<MenuItem> getMenuItems(); List<MenuItem> getMenuItemsWithoutProject(); @Override void onChange(WorkspaceProjectContextChangeEvent previous, WorkspaceProjectContextChangeEvent current); }
NewResourcesMenu implements WorkspaceProjectContextChangeHandler { public List<MenuItem> getMenuItemsWithoutProject() { enableMenuItemsForContext(); if ( projectMenuItem != null && items.contains( projectMenuItem ) ) { return items.subList( 1, items.size() ); } else { return items; } } NewResourcesMenu(); @Inject  NewResourcesMenu( final SyncBeanManager iocBeanManager,
                             final NewResourcePresenter newResourcePresenter,
                             final WorkspaceProjectContext projectContext ); @PostConstruct void setup(); List<MenuItem> getMenuItems(); List<MenuItem> getMenuItemsWithoutProject(); @Override void onChange(WorkspaceProjectContextChangeEvent previous, WorkspaceProjectContextChangeEvent current);  }