org.guvnor.common.services.project.model.Package.getCaption()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(205)

本文整理了Java中org.guvnor.common.services.project.model.Package.getCaption()方法的一些代码示例,展示了Package.getCaption()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Package.getCaption()方法的具体详情如下:
包路径:org.guvnor.common.services.project.model.Package
类名称:Package
方法名:getCaption

Package.getCaption介绍

暂无

代码示例

代码示例来源:origin: org.kie.workbench.widgets/kie-wb-common-ui

private String getSelectedPackage(final Package activePackage,
                 final Map<String, String> packageNames) {
  if (packageNames.containsKey(activePackage.getCaption())) {
    return activePackage.getCaption();
  } else if (!packageNames.isEmpty()) {
    return packageNames.keySet().iterator().next();
  } else {
    return null;
  }
}

代码示例来源:origin: org.kie.workbench.widgets/kie-wb-common-ui

private List<Package> getSortedPackages(final boolean includeDefaultPackage,
                    final Set<Package> pkgs) {
  final List<Package> sortedPackages = new ArrayList<>(pkgs);
  Collections.sort(sortedPackages,
           (p1, p2) -> p1.getCaption().compareTo(p2.getCaption()));
  // Remove default package, if not required (after sorting it is guaranteed to be at index 0)
  if (!includeDefaultPackage
      && !sortedPackages.isEmpty()
      && "".equals(sortedPackages.get(0).getPackageName())) {
    sortedPackages.remove(0);
  }
  return sortedPackages;
}

代码示例来源:origin: org.kie.workbench.widgets/kie-wb-common-ui

private void addPackagesToSelect(final List<Package> sortedPackages,
                 final Package activePackage) {
  final Map<String, String> packageNames = new HashMap<>();
  for (Package pkg : sortedPackages) {
    packageNames.put(pkg.getCaption(),
             pkg.getPackageName());
    packages.put(pkg.getCaption(),
           pkg);
  }
  selectedPackage = getSelectedPackage(activePackage,
                     packageNames);
  view.setUp(selectedPackage,
        packageNames);
}

代码示例来源:origin: org.uberfire/uberfire-project-backend

final org.uberfire.java.nio.file.Path nioPackageRootSrcPath = nioModuleRootPath.resolve(src).resolve(resolvePkgName(pkg.getCaption()));
packageNames.addAll(getPackageNames(nioModuleRootPath,
                  nioPackageRootSrcPath,

代码示例来源:origin: org.guvnor/guvnor-project-backend

final org.uberfire.java.nio.file.Path nioPackageRootSrcPath = nioProjectRootPath.resolve(src).resolve(resolvePkgName(pkg.getCaption()));
packageNames.addAll(getPackageNames(nioProjectRootPath,
                  nioPackageRootSrcPath,

代码示例来源:origin: kiegroup/appformer

final org.uberfire.java.nio.file.Path nioPackageRootSrcPath = nioModuleRootPath.resolve(src).resolve(resolvePkgName(pkg.getCaption()));
packageNames.addAll(getPackageNames(nioModuleRootPath,
                  nioPackageRootSrcPath,

代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend

packages.size());
  for (final Package pkg : packages) {
    if (pkg.getCaption().equals("<default>")) {
      defaultPkg = pkg;
      break;
       defaultPkg.getCaption());
assertEquals("<default>",
       defaultPkg.getRelativeCaption());
       rootPkg.getCaption());
assertEquals("org",
       rootPkg.getRelativeCaption());
       kiePkg.getCaption());
assertEquals("kie",
       kiePkg.getRelativeCaption());

相关文章