use of org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery in project kie-wb-common by kiegroup.
the class ProjectExplorerContentResolverTest method getContentQuery.
private ProjectExplorerContentQuery getContentQuery(final Branch branch, final Module module, final Option content, final Package pkg, final FolderItem item) {
final ProjectExplorerContentQuery projectExplorerContentQuery = new ProjectExplorerContentQuery(repository, branch, module, pkg, item);
final ActiveOptions options = new ActiveOptions();
options.add(Option.TREE_NAVIGATOR);
options.add(Option.EXCLUDE_HIDDEN_ITEMS);
options.add(content);
projectExplorerContentQuery.setOptions(options);
return projectExplorerContentQuery;
}
use of org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery in project kie-wb-common by kiegroup.
the class ProjectExplorerContentResolverTest method testChangeModuleOnTechnicalViewWhenThereIsAFolderItemButNoActiveModuleOrganizationalUnitOrRepository.
@Test
public void testChangeModuleOnTechnicalViewWhenThereIsAFolderItemButNoActiveModuleOrganizationalUnitOrRepository() {
resolver.resolve(getContentQuery(mainBranch, createModule("main", mainBranch, "module 1"), Option.TECHNICAL_CONTENT));
helperWrapper.reset();
ProjectExplorerContentQuery projectExplorerContentQuery = new ProjectExplorerContentQuery(null, null, null, null, getFileItem());
ActiveOptions options = new ActiveOptions();
options.add(Option.TECHNICAL_CONTENT);
projectExplorerContentQuery.setOptions(options);
helperWrapper.excludePackage();
Content content = resolver.setupSelectedItems(projectExplorerContentQuery);
helperWrapper.reset();
assertEquals("main", content.getSelectedProject().getBranch().getName());
assertEquals("main@module 1", content.getSelectedModule().getRootPath().toURI());
assertNotNull(content.getSelectedItem());
assertNull(content.getSelectedPackage());
}
use of org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery in project kie-wb-common by kiegroup.
the class ActiveContextManager method initActiveContext.
public void initActiveContext(final Repository repository, final Branch branch) {
view.showBusyIndicator(CommonConstants.INSTANCE.Loading());
refresh(new ProjectExplorerContentQuery(repository, branch));
}
use of org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery in project kie-wb-common by kiegroup.
the class ProjectExplorerContentResolverTest method testResolveWithOUWithRepositoryNullQueryBusinessView.
@Test
public void testResolveWithOUWithRepositoryNullQueryBusinessView() throws Exception {
final ProjectExplorerContentQuery query = new ProjectExplorerContentQuery(repository, mainBranch);
final ActiveOptions options = new ActiveOptions();
options.add(Option.TREE_NAVIGATOR);
options.add(Option.EXCLUDE_HIDDEN_ITEMS);
options.add(Option.BUSINESS_CONTENT);
query.setOptions(options);
resolver.resolve(query);
}
use of org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery in project kie-wb-common by kiegroup.
the class ProjectExplorerContentResolverTest method testResolveWithOUWithRepositoryNullQueryTechnicalView.
@Test
public void testResolveWithOUWithRepositoryNullQueryTechnicalView() throws Exception {
final ProjectExplorerContentQuery query = new ProjectExplorerContentQuery(repository, mainBranch);
final ActiveOptions options = new ActiveOptions();
options.add(Option.TREE_NAVIGATOR);
options.add(Option.EXCLUDE_HIDDEN_ITEMS);
options.add(Option.TECHNICAL_CONTENT);
query.setOptions(options);
resolver.resolve(query);
}
Aggregations