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

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

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

Package.getPackageTestResourcesPath介绍

暂无

代码示例

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

@Override
public boolean accept(final Path path) {
  final Package pkg = moduleService.resolvePackage(path);
  if (pkg == null) {
    return false;
  }
  return pkg.getPackageMainSrcPath().equals(path) ||
      pkg.getPackageMainResourcesPath().equals(path) ||
      pkg.getPackageTestSrcPath().equals(path) ||
      pkg.getPackageTestResourcesPath().equals(path);
}

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

public List<FolderItem> getItems(final Package pkg,
                 final ActiveOptions options) {
  final List<FolderItem> folderItems = new ArrayList<FolderItem>();
  if (pkg == null) {
    return emptyList();
  }
  final Set<Package> childPackages = moduleService.resolvePackages(pkg);
  for (final Package childPackage : childPackages) {
    folderItems.add(toFolderItem(childPackage));
  }
  folderItems.addAll(getItems(pkg.getPackageMainSrcPath(),
                options));
  folderItems.addAll(getItems(pkg.getPackageTestSrcPath(),
                options));
  folderItems.addAll(getItems(pkg.getPackageMainResourcesPath(),
                options));
  folderItems.addAll(getItems(pkg.getPackageTestResourcesPath(),
                options));
  Collections.sort(folderItems,
           Sorters.ITEM_SORTER);
  return folderItems;
}

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

@Override
public Path getTargetPath() {
  if (thereIsAnActiveProject()) {
    final String path = presenter.getPath().toURI();
    final Package selectedPackage = packageListBox.getSelectedPackage();
    if (path.contains(ModuleResourcePaths.MAIN_RESOURCES_PATH)) {
      return selectedPackage.getPackageMainResourcesPath();
    } else if (path.contains(ModuleResourcePaths.MAIN_SRC_PATH)) {
      return selectedPackage.getPackageMainSrcPath();
    } else if (path.contains(ModuleResourcePaths.TEST_RESOURCES_PATH)) {
      return selectedPackage.getPackageTestResourcesPath();
    } else if (path.contains(ModuleResourcePaths.TEST_SRC_PATH)) {
      return selectedPackage.getPackageTestSrcPath();
    }
  }
  return null;
}

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

public void invalidateProjectPackagesCache(@Observes final InvalidateDMOModuleCacheEvent event) {
  PortablePreconditions.checkNotNull("event",
                    event);
  final Path resourcePath = event.getResourcePath();
  final KieModule module = moduleService.resolveModule(resourcePath);
  //If resource was not within a Module there's nothing to invalidate
  if (module == null) {
    return;
  }
  final String moduleUri = module.getRootPath().toURI();
  final List<Package> cacheEntriesToInvalidate = new ArrayList<Package>();
  for (final Package pkg : getKeys()) {
    final Path packageMainSrcPath = pkg.getPackageMainSrcPath();
    final Path packageTestSrcPath = pkg.getPackageTestSrcPath();
    final Path packageMainResourcesPath = pkg.getPackageMainResourcesPath();
    final Path packageTestResourcesPath = pkg.getPackageTestResourcesPath();
    if (packageMainSrcPath != null && packageMainSrcPath.toURI().startsWith(moduleUri)) {
      cacheEntriesToInvalidate.add(pkg);
    } else if (packageTestSrcPath != null && packageTestSrcPath.toURI().startsWith(moduleUri)) {
      cacheEntriesToInvalidate.add(pkg);
    } else if (packageMainResourcesPath != null && packageMainResourcesPath.toURI().startsWith(moduleUri)) {
      cacheEntriesToInvalidate.add(pkg);
    } else if (packageTestResourcesPath != null && packageTestResourcesPath.toURI().startsWith(moduleUri)) {
      cacheEntriesToInvalidate.add(pkg);
    }
  }
  for (final Package pkg : cacheEntriesToInvalidate) {
    invalidateCache(pkg);
  }
}

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

when(pkg.getPackageTestSrcPath()).thenReturn(srcTestPath);
when(pkg.getPackageMainResourcesPath()).thenReturn(srcResourcesPath);
when(pkg.getPackageTestResourcesPath()).thenReturn(testResourcesPath);

代码示例来源:origin: kiegroup/drools-wb

@Override
public void create( final Package pkg,
          final String baseFileName,
          final NewResourcePresenter presenter ) {
  busyIndicatorView.showBusyIndicator( CommonConstants.INSTANCE.Saving() );
  service.call(
      getSuccessCallback( presenter ),
      new HasBusyIndicatorDefaultErrorCallback( busyIndicatorView ) ).create( pkg.getPackageTestResourcesPath(),
                                          buildFileName( baseFileName,
                                                  resourceType ),
                                          new Scenario( pkg.getPackageName(),
                                                 baseFileName ),
                                          "" );
}

代码示例来源:origin: kiegroup/drools-wb

@Override
public void create(final Package pkg,
          final String baseFileName,
          final NewResourcePresenter presenter) {
  final ScenarioSimulationModel.Type selectedType = sourceTypeSelector.getSelectedType();
  String value;
  switch (selectedType) {
    case DMN:
      value = uploadWidget.getSelectedPath();
      if (value == null || value.isEmpty()) {
        return;
      }
      break;
    case RULE:
    default:
      value = "default";
  }
  busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Saving());
  scenarioSimulationService.call(getSuccessCallback(presenter),
                  new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)).create(pkg.getPackageTestResourcesPath(),
                                                    buildFileName(baseFileName,
                                                           resourceType),
                                                    new ScenarioSimulationModel(),
                                                    "",
                                                    selectedType,
                                                    value);
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-explorer-client

final Path pkgTestSrcPath = pkg.getPackageTestSrcPath();
final Path pkgMainResourcesPath = pkg.getPackageMainResourcesPath();
final Path pkgTestResourcesPath = pkg.getPackageTestResourcesPath();

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

false));
packageNames.addAll(getPackageNames(nioModuleRootPath,
                  Paths.convert(pkg.getPackageTestResourcesPath()).getParent(),
                  true,
                  false,

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

false));
packageNames.addAll(getPackageNames(nioModuleRootPath,
                  Paths.convert(pkg.getPackageTestResourcesPath()).getParent(),
                  true,
                  false,

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

false));
packageNames.addAll(getPackageNames(nioProjectRootPath,
                  Paths.convert(pkg.getPackageTestResourcesPath()).getParent(),
                  true,
                  false,

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

public boolean hasAssets(final Package pkg) {
  if (pkg == null) {
    return false;
  }
  if (hasAssets(pkg.getPackageMainSrcPath())
      || hasAssets(pkg.getPackageTestSrcPath())
      || hasAssets(pkg.getPackageMainResourcesPath())
      || hasAssets(pkg.getPackageTestResourcesPath())) {
    return true;
  }
  final Set<Package> childPackages = moduleService.resolvePackages(pkg);
  for (final Package childPackage : childPackages) {
    if (!childPackage.equals(pkg) && hasAssets(childPackage)) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-explorer-client

final Path pkgTestSrcPath = pkg.getPackageTestSrcPath();
final Path pkgMainResourcesPath = pkg.getPackageMainResourcesPath();
final Path pkgTestResourcesPath = pkg.getPackageTestResourcesPath();

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

add(pkg.getPackageMainResourcesPath());
  add(pkg.getPackageMainSrcPath());
  add(pkg.getPackageTestResourcesPath());
  add(pkg.getPackageTestSrcPath());
}};
      add(pkg.getPackageMainResourcesPath());
      add(pkg.getPackageMainSrcPath());
      add(pkg.getPackageTestResourcesPath());
      add(pkg.getPackageTestSrcPath());
    }};

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

final Path testSrcPath = parentPackage.getPackageTestSrcPath();
final Path mainResourcesPath = parentPackage.getPackageMainResourcesPath();
final Path testResourcesPath = parentPackage.getPackageTestResourcesPath();

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

final Path testSrcPath = parentPackage.getPackageTestSrcPath();
final Path mainResourcesPath = parentPackage.getPackageMainResourcesPath();
final Path testResourcesPath = parentPackage.getPackageTestResourcesPath();

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

final Path testSrcPath = parentPackage.getPackageTestSrcPath();
final Path mainResourcesPath = parentPackage.getPackageMainResourcesPath();
final Path testResourcesPath = parentPackage.getPackageTestResourcesPath();

相关文章