@Test public void testOnActiveOptionsChange() throws Exception { presenter.onActiveOptionsChange(new ActiveOptionsChangedEvent()); verify(view).setVisible(true); isPresenterVisible = false; presenter.onActiveOptionsChange(new ActiveOptionsChangedEvent()); verify(view).setVisible(false); }
public void onActiveOptionsChange(final @Observes ActiveOptionsChangedEvent changedEvent) { final boolean isVisible = isViewVisible(); setVisible(isVisible); if (isVisible) { initialiseViewForActiveContext(context); } }
BaseViewPresenter { public void onActiveOptionsChange(final @Observes ActiveOptionsChangedEvent changedEvent) { final boolean isVisible = isViewVisible(); setVisible(isVisible); if (isVisible) { initialiseViewForActiveContext(context); } } }
BaseViewPresenter { public void onActiveOptionsChange(final @Observes ActiveOptionsChangedEvent changedEvent) { final boolean isVisible = isViewVisible(); setVisible(isVisible); if (isVisible) { initialiseViewForActiveContext(context); } } BaseViewPresenter(BaseViewImpl baseView); }
BaseViewPresenter { public void onActiveOptionsChange(final @Observes ActiveOptionsChangedEvent changedEvent) { final boolean isVisible = isViewVisible(); setVisible(isVisible); if (isVisible) { initialiseViewForActiveContext(context); } } BaseViewPresenter(BaseViewImpl baseView); @PostConstruct void init(); void onActiveOptionsChange(final @Observes ActiveOptionsChangedEvent changedEvent); void update(); void refresh(); void loadContent(final FolderItem item); FolderListing getActiveContent(); void deleteItem(final FolderItem folderItem); void renameItem(final FolderItem folderItem); void copyItem(final FolderItem folderItem); void uploadArchivedFolder(final FolderItem folderItem); String getCurrentTag(); Set<String> getActiveContentTags(); void onModuleSelected(final Module module); void onActiveFolderItemSelected(final FolderItem item); void onItemSelected(final FolderItem folderItem); void setVisible(final boolean visible); void onTagFilterChanged(@Observes TagChangedEvent event); void onResourceUpdated(@Observes final ResourceUpdatedEvent event); void onResourceAdded(@Observes final ResourceAddedEvent event); void onResourceDeleted(@Observes final ResourceDeletedEvent event); void onResourceCopied(@Observes final ResourceCopiedEvent event); void onLockStatusChange(@Observes final LockInfo lockInfo); void initialiseViewForActiveContext(final WorkspaceProjectContext context); void initialiseViewForActiveContext(String initPath); void onResourceRenamed(@Observes final ResourceRenamedEvent event); boolean canShowTags(); }
BaseViewPresenter { public void onActiveOptionsChange(final @Observes ActiveOptionsChangedEvent changedEvent) { final boolean isVisible = isViewVisible(); setVisible(isVisible); if (isVisible) { initialiseViewForActiveContext(context); } } BaseViewPresenter(BaseViewImpl baseView); @PostConstruct void init(); void onActiveOptionsChange(final @Observes ActiveOptionsChangedEvent changedEvent); void update(); void refresh(); void loadContent(final FolderItem item); FolderListing getActiveContent(); void deleteItem(final FolderItem folderItem); void renameItem(final FolderItem folderItem); void copyItem(final FolderItem folderItem); void uploadArchivedFolder(final FolderItem folderItem); String getCurrentTag(); Set<String> getActiveContentTags(); void onModuleSelected(final Module module); void onActiveFolderItemSelected(final FolderItem item); void onItemSelected(final FolderItem folderItem); void setVisible(final boolean visible); void onTagFilterChanged(@Observes TagChangedEvent event); void onResourceUpdated(@Observes final ResourceUpdatedEvent event); void onResourceAdded(@Observes final ResourceAddedEvent event); void onResourceDeleted(@Observes final ResourceDeletedEvent event); void onResourceCopied(@Observes final ResourceCopiedEvent event); void onLockStatusChange(@Observes final LockInfo lockInfo); void initialiseViewForActiveContext(final WorkspaceProjectContext context); void initialiseViewForActiveContext(String initPath); void onResourceRenamed(@Observes final ResourceRenamedEvent event); boolean canShowTags();  }