@WorkbenchMenu
 public Menus getMenus() {
   return MenuFactory.newTopLevelMenu(constants.MenuOrganizationalUnits())
       .withPermission(OrganizationalUnit.RESOURCE_TYPE, OrganizationalUnitAction.READ)
       .menus()
       .menu(constants.MenuManageOrganizationalUnits())
       .respondsWith(
           () ->
               placeManager.goTo(
                   "org.kie.workbench.common.screens.organizationalunit.manager.OrganizationalUnitManager"))
       .endMenu()
       .endMenus()
       .endMenu()
       .newTopLevelMenu(constants.repositories())
       .menus()
       .menu(constants.listRepositories())
       .withPermission(Repository.RESOURCE_TYPE, RepositoryAction.READ)
       .respondsWith(() -> placeManager.goTo("RepositoriesEditor"))
       .endMenu()
       .menu(constants.cloneRepository())
       .withPermission(Repository.RESOURCE_TYPE, RepositoryAction.READ)
       .respondsWith(cloneRepoCommand)
       .endMenu()
       .menu(constants.newRepository())
       .withPermission(Repository.RESOURCE_TYPE, RepositoryAction.CREATE)
       .respondsWith(newRepoCommand)
       .endMenu()
       .endMenus()
       .endMenu()
       .build();
 }
 private void onOrganizationalUnitEvent(LinkCommandParams parameters) {
   if (hasAccessRightsForFeature("wb_administration")) {
     placeManager.goTo("AdministrationPerspective");
     placeManager.goTo(
         "org.kie.workbench.common.screens.organizationalunit.manager.OrganizationalUnitManager");
   } else {
     generateNoRightsPopup();
   }
 }
 @EventHandler("fullButton")
 public void fullButton(ClickEvent e) {
   presenter.close();
   PlaceRequest placeRequestImpl = new DefaultPlaceRequest("Task Edit Perspective");
   placeRequestImpl.addParameter("taskId", taskIdText.getText());
   placeManager.goTo(placeRequestImpl);
 }
 private void onVFSLinkEvent(LinkCommandParams parameters) {
   if (hasAccessRightsForFeature("wb_project_authoring")) {
     placeManager.goTo("AuthoringPerspective");
     socialFileSelectedEvent.fire(
         new SocialFileSelectedEvent(parameters.getEventType(), parameters.getLink()));
   } else {
     generateNoRightsPopup();
   }
 }
 @Override
 public void itemSelected(final FolderItem folderItem) {
   final Object _item = folderItem.getItem();
   if (_item == null) {
     return;
   }
   if (folderItem.getType().equals(FolderItemType.FILE) && _item instanceof Path) {
     placeManager.goTo((Path) _item);
   } else {
     activeFolderItemSelected(folderItem);
   }
 }
Пример #6
0
  public void showReport(final AnalysisReport report) {
    currentReport = report;

    if (!report.getAnalysisData().isEmpty()) {
      placeManager.goTo(IDENTIFIER);
    } else {
      placeManager.closePlace(IDENTIFIER);
    }

    dataProvider.setList(report.getAnalysisData());

    if (dataProvider.getList().isEmpty()) {
      view.clearIssue();
    } else {
      view.show(dataProvider.getList().get(0));
    }
  }
Пример #7
0
 @UiHandler("activityNotFound")
 public void onClickActivityNotFound(final ClickEvent event) {
   placeManager.goTo("some.place.does.not.exists.please!");
 }
Пример #8
0
 @UiHandler("launchUnknownPlace")
 public void onClickLaunchUnknownPlace(final ClickEvent event) {
   placeManager.goTo(new DefaultPlaceRequest("MyTestPopUp"));
 }
Пример #9
0
 @EventHandler("newRepo")
 public void newRepo(ClickEvent e) {
   placeManager.goTo(new DefaultPlaceRequest("NewRepo"));
 }