コード例 #1
0
 @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();
   }
 }
コード例 #3
0
 @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();
   }
 }
コード例 #5
0
 @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
ファイル: MiscFeaturesView.java プロジェクト: rhusar/uberfire
 @UiHandler("activityNotFound")
 public void onClickActivityNotFound(final ClickEvent event) {
   placeManager.goTo("some.place.does.not.exists.please!");
 }
コード例 #8
0
ファイル: MiscFeaturesView.java プロジェクト: rhusar/uberfire
 @UiHandler("launchUnknownPlace")
 public void onClickLaunchUnknownPlace(final ClickEvent event) {
   placeManager.goTo(new DefaultPlaceRequest("MyTestPopUp"));
 }
コード例 #9
0
ファイル: RepoList.java プロジェクト: uberfire/uberfire-thora
 @EventHandler("newRepo")
 public void newRepo(ClickEvent e) {
   placeManager.goTo(new DefaultPlaceRequest("NewRepo"));
 }