当前位置: 首页>>代码示例>>Java>>正文


Java ProductionResourceContentFolderTypeProvider类代码示例

本文整理汇总了Java中consulo.roots.impl.ProductionResourceContentFolderTypeProvider的典型用法代码示例。如果您正苦于以下问题:Java ProductionResourceContentFolderTypeProvider类的具体用法?Java ProductionResourceContentFolderTypeProvider怎么用?Java ProductionResourceContentFolderTypeProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ProductionResourceContentFolderTypeProvider类属于consulo.roots.impl包,在下文中一共展示了ProductionResourceContentFolderTypeProvider类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: moduleCompileOutputChanged

import consulo.roots.impl.ProductionResourceContentFolderTypeProvider; //导入依赖的package包/类
@Override
public void moduleCompileOutputChanged(final String baseUrl, final String moduleName) {
  ModuleCompilerPathsManager moduleCompilerPathsManager = ModuleCompilerPathsManager.getInstance(getModule());
  if (moduleCompilerPathsManager.isInheritedCompilerOutput()) {
    if (baseUrl != null) {
      myOutputPathPanel.setText(FileUtil.toSystemDependentName(
              VfsUtilCore.urlToPath(moduleCompilerPathsManager.getCompilerOutputUrl(ProductionContentFolderTypeProvider.getInstance()))));
      myTestsOutputPathPanel.setText(FileUtil.toSystemDependentName(
              VfsUtilCore.urlToPath(moduleCompilerPathsManager.getCompilerOutputUrl(TestContentFolderTypeProvider.getInstance()))));
      myResourcesOutputPathPanel.setText(FileUtil.toSystemDependentName(
              VfsUtilCore.urlToPath(moduleCompilerPathsManager.getCompilerOutputUrl(ProductionResourceContentFolderTypeProvider.getInstance()))));
      myTestResourcesOutputPathPanel.setText(FileUtil.toSystemDependentName(
              VfsUtilCore.urlToPath(moduleCompilerPathsManager.getCompilerOutputUrl(TestResourceContentFolderTypeProvider.getInstance()))));
    }
    else {
      myOutputPathPanel.setText(null);
      myTestsOutputPathPanel.setText(null);
      myResourcesOutputPathPanel.setText(null);
      myTestResourcesOutputPathPanel.setText(null);
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:23,代码来源:BuildElementsEditor.java

示例2: filterResourceFiles

import consulo.roots.impl.ProductionResourceContentFolderTypeProvider; //导入依赖的package包/类
@NotNull
private static List<VirtualFile> filterResourceFiles(CompileContext compileContext, VirtualFile[] virtualFiles)
{
	ProjectFileIndex fileIndex = ProjectFileIndex.getInstance(compileContext.getProject());

	List<VirtualFile> list = new ArrayList<>(virtualFiles.length);
	for(VirtualFile file : virtualFiles)
	{
		ContentFolderTypeProvider provider = fileIndex.getContentFolderTypeForFile(file);
		if(provider == ProductionResourceContentFolderTypeProvider.getInstance() || provider == TestResourceContentFolderTypeProvider.getInstance())
		{
			continue;
		}
		list.add(file);
	}
	return list;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:18,代码来源:JavaCompiler.java

示例3: toField

import consulo.roots.impl.ProductionResourceContentFolderTypeProvider; //导入依赖的package包/类
private CommitableFieldPanel toField(ContentFolderTypeProvider contentFolderTypeProvider) {
  if (contentFolderTypeProvider == ProductionContentFolderTypeProvider.getInstance()) {
    return myOutputPathPanel;
  }
  else if (contentFolderTypeProvider == ProductionResourceContentFolderTypeProvider.getInstance()) {
    return myResourcesOutputPathPanel;
  }
  else if (contentFolderTypeProvider == TestContentFolderTypeProvider.getInstance()) {
    return myTestsOutputPathPanel;
  }
  else if (contentFolderTypeProvider == TestResourceContentFolderTypeProvider.getInstance()) {
    return myTestResourcesOutputPathPanel;
  }
  throw new IllegalArgumentException(contentFolderTypeProvider.getId());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:16,代码来源:BuildElementsEditor.java

示例4: patch

import consulo.roots.impl.ProductionResourceContentFolderTypeProvider; //导入依赖的package包/类
@Override
public void patch(@NotNull ModifiableRootModel model, @NotNull Set<ContentFolderTypeProvider> set)
{
	ModuleExtension javaModuleExtension = model.getExtension("java");
	if(javaModuleExtension != null)
	{
		set.add(ProductionContentFolderTypeProvider.getInstance());
		set.add(ProductionResourceContentFolderTypeProvider.getInstance());
		set.add(TestContentFolderTypeProvider.getInstance());
		set.add(TestResourceContentFolderTypeProvider.getInstance());
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:13,代码来源:JavaContentFolderSupportPatcher.java

示例5: doCreateArtifactTemplate

import consulo.roots.impl.ProductionResourceContentFolderTypeProvider; //导入依赖的package包/类
@NotNull
@RequiredReadAction
public static NewArtifactConfiguration doCreateArtifactTemplate(Module module, PackagingElementResolvingContext packagingElementResolvingContext)
{
	ModulesProvider modulesProvider = packagingElementResolvingContext.getModulesProvider();

	Project project = module.getProject();
	CompositePackagingElement<?> root = ExplodedWarArtifactType.getInstance().createRootElement(module.getName());

	DirectoryPackagingElement webInfDir = DirectoryElementType.getInstance().createEmpty(project);
	webInfDir.setDirectoryName(JavaWebConstants.WEB_INF);
	root.addFirstChild(webInfDir);

	DirectoryPackagingElement libDir = DirectoryElementType.getInstance().createEmpty(project);
	libDir.setDirectoryName("lib");
	webInfDir.addFirstChild(libDir);

	Set<Library> libraries = new ArrayListSet<>();
	Set<Module> modules = new ArrayListSet<>();

	collectInfo(modules, libraries, modulesProvider, module);

	for(Module toAddModule : modules)
	{
		NamedPointer<Module> pointer = ModuleUtilCore.createPointer(toAddModule);
		ModuleRootModel rootModel = modulesProvider.getRootModel(toAddModule);

		ZipArchivePackagingElement zipArchivePackagingElement = ZipArchiveElementType.getInstance().createEmpty(project);
		zipArchivePackagingElement.setArchiveFileName(toAddModule.getName() + ".jar");

		if(rootModel.getContentFolders(ContentFolderScopes.of(ProductionContentFolderTypeProvider.getInstance())).length > 0)
		{
			zipArchivePackagingElement.addFirstChild(ProductionModuleOutputElementType.getInstance().createElement(project, pointer));
		}

		if(rootModel.getContentFolders(ContentFolderScopes.of(ProductionResourceContentFolderTypeProvider.getInstance())).length > 0)
		{
			zipArchivePackagingElement.addFirstChild(ProductionResourceModuleOutputElementType.getInstance().createElement(project, pointer));
		}

		libDir.addFirstChild(zipArchivePackagingElement);

		if(rootModel.getContentFolders(ContentFolderScopes.of(WebResourcesFolderTypeProvider.getInstance())).length > 0)
		{
			root.addFirstChild(WebResourceModuleOutputElementType.getInstance().createElement(project, pointer));
		}
	}

	for(Library library : libraries)
	{
		LibraryPackagingElement libraryPackagingElement = LibraryElementType.getInstance().createEmpty(project);
		libraryPackagingElement.setLibraryName(library.getName());

		LibraryTable table = library.getTable();

		String tableLevel = table == null ? null : table.getTableLevel();
		libraryPackagingElement.setLevel(tableLevel);

		if(LibraryTableImplUtil.MODULE_LEVEL.equals(tableLevel))
		{
			libraryPackagingElement.setModuleName(((ModuleLibraryTable) table).getModule().getName());
		}

		libDir.addFirstChild(libraryPackagingElement);
	}

	return new NewArtifactConfiguration(root, ExplodedWarArtifactType.getInstance().getPresentableName() + ": " + module.getName(), ExplodedWarArtifactType.getInstance());
}
 
开发者ID:consulo,项目名称:consulo-javaee,代码行数:69,代码来源:ExplodedWarArtifactTemplate.java

示例6: isInResource

import consulo.roots.impl.ProductionResourceContentFolderTypeProvider; //导入依赖的package包/类
@Override
public boolean isInResource(@Nonnull VirtualFile fileOrDir) {
  DirectoryInfo info = getInfoForFileOrDirectory(fileOrDir);
  return info.isInModuleSource() && myDirectoryIndex.getContentFolderType(info) == ProductionResourceContentFolderTypeProvider.getInstance();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:ProjectFileIndexImpl.java

示例7: ProductionResourceModuleOutputElementType

import consulo.roots.impl.ProductionResourceContentFolderTypeProvider; //导入依赖的package包/类
public ProductionResourceModuleOutputElementType() {
  super("module-production-resource-output", ProductionResourceContentFolderTypeProvider.getInstance());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:ProductionResourceModuleOutputElementType.java

示例8: isInsideResourceRoot

import consulo.roots.impl.ProductionResourceContentFolderTypeProvider; //导入依赖的package包/类
private static boolean isInsideResourceRoot(VirtualFile file, ProjectFileIndex fileIndex)
{
	ContentFolderTypeProvider provider = fileIndex.getContentFolderTypeForFile(file);
	return provider == ProductionResourceContentFolderTypeProvider.getInstance() || provider == TestResourceContentFolderTypeProvider.getInstance();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:6,代码来源:JavaProjectRootsUtil.java


注:本文中的consulo.roots.impl.ProductionResourceContentFolderTypeProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。