use of org.kie.workbench.common.screens.library.client.events.WorkbenchProjectMetricsEvent in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method init.
@Before
public void init() throws Exception {
super.init();
when(project.getRepository()).thenReturn(repository);
when(repository.getAlias()).thenReturn("repo");
when(project.getName()).thenReturn("project1");
contributorsDataSet = ContributorsData.INSTANCE.toDataSet();
contributorsDataSet.setUUID(ContributorsDataSets.GIT_CONTRIB);
clientDataSetManager.registerDataSet(contributorsDataSet);
displayerCoordinator = new DisplayerCoordinator(rendererManager);
displayerCoordinator.addListener(displayerListener);
metricsFactory = new ProjectMetricsFactory(i18n, displayerLocator);
presenter = new ProjectMetricsScreen(view, i18n, metricsFactory, displayerCoordinator);
presenter.onStartup(new WorkbenchProjectMetricsEvent(project));
}
use of org.kie.workbench.common.screens.library.client.events.WorkbenchProjectMetricsEvent in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToProjectMetrics.
public void goToProjectMetrics() {
final PlaceRequest metricsScreen = new DefaultPlaceRequest(LibraryPlaces.PROJECT_METRICS_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(metricsScreen);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
setupLibraryBreadCrumbsForProjectMetrics();
projectMetricsEvent.fire(new WorkbenchProjectMetricsEvent(projectContext.getActiveWorkspaceProject().orElseThrow(() -> new IllegalStateException("Cannot fire event for project metrics without an active project."))));
}
Aggregations