• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FacetTypeRegistry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: excludeFrameworkDetection

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
private void excludeFrameworkDetection(final Project project, FacetTypeId facetTypeId) {
    final DetectionExcludesConfiguration configuration = DetectionExcludesConfiguration.getInstance(project);
    final FacetType facetType = FacetTypeRegistry.getInstance().findFacetType(facetTypeId);
    final FrameworkType frameworkType = FrameworkDetectionUtil.findFrameworkTypeForFacetDetector(facetType);

    if (frameworkType != null) {
        configuration.addExcludedFramework(frameworkType);
    }
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:10,代码来源:ImportProjectProgressModalWindow.java


示例2: configure

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@Override
public void configure(
    @NotNull final ModifiableFacetModel modifiableFacetModel,
    @NotNull final HybrisModuleDescriptor moduleDescriptor,
    @NotNull final Module javaModule,
    @NotNull final ModifiableRootModel modifiableRootModel
) {
    final File webRoot = moduleDescriptor.getWebRoot();
    if (null == webRoot) {
        return;
    }

    WebFacet webFacet = modifiableFacetModel.getFacetByType(WebFacet.ID);

    if (webFacet == null) {
        final FacetType<WebFacet, FacetConfiguration> webFacetType = FacetTypeRegistry.getInstance().findFacetType(
            WebFacet.ID
        );

        if (!webFacetType.isSuitableModuleType(ModuleType.get(javaModule))) {
            return;
        }

        webFacet = FacetManager.getInstance(javaModule).createFacet(
            webFacetType, webFacetType.getDefaultFacetName(), null
        );

        modifiableFacetModel.addFacet(webFacet);

    } else {
        webFacet.removeAllWebRoots();
        webFacet.getDescriptorsContainer().getConfiguration().removeConfigFiles(
            DeploymentDescriptorsConstants.WEB_XML_META_DATA
        );
    }

    webFacet.setWebSourceRoots(modifiableRootModel.getSourceRootUrls(false));
    webFacet.addWebRootNoFire(VfsUtil.pathToUrl(FileUtil.toSystemIndependentName(webRoot.getAbsolutePath())), "/");
    this.setupFacetDeploymentDescriptor(webFacet, moduleDescriptor);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:41,代码来源:WebFacetConfigurator.java


示例3: setMuleFacet

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
public void setMuleFacet(Module module) {
    MuleFacetType type = (MuleFacetType)FacetTypeRegistry.getInstance().findFacetType(MuleFacet.ID);
    MuleFacetConfiguration configuration = type.createDefaultConfiguration();
    configuration.setPathToSdk(MuleSdkManager.getInstance().findFromVersion(muleVersion).getMuleHome());
    Facet facet = type.createFacet(module, type.getPresentableName(), configuration, null);
    ModifiableFacetModel model = FacetManager.getInstance(module).createModifiableModel();
    model.addFacet(facet);
    model.commit();
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:10,代码来源:MuleMavenModuleBuilder.java


示例4: createAddFacetActions

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
public static AnAction[] createAddFacetActions(FacetStructureConfigurable configurable) {
  final List<AnAction> result = new ArrayList<AnAction>();
  final StructureConfigurableContext context = configurable.myContext;
  for (FacetType type : FacetTypeRegistry.getInstance().getSortedFacetTypes()) {
    if (hasSuitableModules(context, type)) {
      result.add(new AddFacetOfTypeAction(type, context));
    }
  }
  return result.toArray(new AnAction[result.size()]);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:AddFacetOfTypeAction.java


示例5: getFacetTypes

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
public List<FacetType> getFacetTypes() {
  return ContainerUtil.mapNotNull(getFacetIds(), new NullableFunction<String, FacetType>() {
    @Override
    public FacetType fun(String facetId) {
      return FacetTypeRegistry.getInstance().findFacetType(facetId);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:FacetDependentToolWindow.java


示例6: createTestModules

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
/** Creates all {@link Module modules} annotated with {@link TestModule}. */
private void createTestModules() throws IllegalAccessException {
  for (Field field : getFieldsWithAnnotation(testInstance.getClass(), TestModule.class)) {
    field.setAccessible(true);
    if (!field.getType().equals(Module.class)) {
      throw new IllegalArgumentException(
          "@TestModule can only annotate fields of type com.intellij.openapi.module.Module");
    }

    writeOnMainThread(
        () -> {
          Module module =
              ModuleManager.getInstance(testFixture.getProject())
                  .newModule(
                      testFixture.getProject().getBasePath()
                          + "/"
                          + moduleCounter.incrementAndGet()
                          + ModuleFileType.DOT_DEFAULT_EXTENSION,
                      ModuleType.EMPTY.getId());
          field.set(testInstance, module);

          String facetTypeId = field.getAnnotation(TestModule.class).facetTypeId();
          if (!Strings.isNullOrEmpty(facetTypeId)) {
            FacetType<?, ?> facetType =
                FacetTypeRegistry.getInstance().findFacetType(facetTypeId);
            FacetManager.getInstance(module)
                .addFacet(facetType, facetTypeId, /* underlying= */ null);
          }
        });
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:32,代码来源:CloudToolsRule.java


示例7: configure

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@Override
public void configure(
    @NotNull final ModifiableFacetModel modifiableFacetModel,
    @NotNull final HybrisModuleDescriptor moduleDescriptor,
    @NotNull final Module javaModule,
    @NotNull final ModifiableRootModel modifiableRootModel
) {
    Validate.notNull(javaModule);
    Validate.notNull(modifiableFacetModel);
    Validate.notNull(moduleDescriptor);
    Validate.notNull(modifiableFacetModel);

    SpringFacet springFacet = modifiableFacetModel.getFacetByType(SpringFacet.FACET_TYPE_ID);

    if (springFacet == null) {
        final FacetType<SpringFacet, SpringFacetConfiguration> springFacetType = FacetTypeRegistry
            .getInstance().findFacetType(SpringFacet.FACET_TYPE_ID);

        if (!springFacetType.isSuitableModuleType(ModuleType.get(javaModule))) {
            return;
        }

        springFacet = springFacetType.createFacet(
            javaModule, springFacetType.getDefaultFacetName(), springFacetType.createDefaultConfiguration(), null
        );

        modifiableFacetModel.addFacet(springFacet);
    } else {
        springFacet.removeFileSets();
    }

    final String facetId = moduleDescriptor.getName() + SpringFacet.FACET_TYPE_ID.toString();
    final SpringFileSet springFileSet = springFacet.addFileSet(facetId, facetId);

    for (String springFile : moduleDescriptor.getSpringFileSet()) {
        final VirtualFile vf = VfsUtil.findFileByIoFile(new File(springFile), true);

        if (null != vf) {
            springFileSet.addFile(vf);
        }
    }
    final CustomSetting.BOOLEAN setting = springFacet.findSetting(LocalXmlModel.PROCESS_EXPLICITLY_ANNOTATED);

    if (setting != null) {
        setting.setBooleanValue(false);
    }
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:48,代码来源:SpringFacetConfigurator.java


示例8: getFacetType

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@NotNull
public static XposedFacetType getFacetType() {
    return (XposedFacetType)FacetTypeRegistry.getInstance().findFacetType(ID);
}
 
开发者ID:apsun,项目名称:XposedPlugin,代码行数:5,代码来源:XposedFacet.java


示例9: getCreateElementIcon

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@Override
public Icon getCreateElementIcon() {
  return FacetTypeRegistry.getInstance().findFacetType(myFacetType).getIcon();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:FacetBasedPackagingElementType.java


示例10: getItemIcon

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@Override
protected Icon getItemIcon(F item) {
  return FacetTypeRegistry.getInstance().findFacetType(myFacetType).getIcon();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:FacetBasedPackagingElementType.java


示例11: getInstance

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
public static BuildoutFacetType getInstance() {
  return (BuildoutFacetType)FacetTypeRegistry.getInstance().findFacetType(ID);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:BuildoutFacetType.java


示例12: getFacetType

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@NotNull
public static AndroidFacetType getFacetType() {
  return (AndroidFacetType)FacetTypeRegistry.getInstance().findFacetType(ID);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AndroidFacet.java


示例13: mockFacetRegistry

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
private void mockFacetRegistry(Container applicationServices) {
  applicationServices.register(FacetTypeRegistry.class, new FacetTypeRegistryImpl());
  registerExtensionPoint(FacetType.EP_NAME, FacetType.class)
      .registerExtension(new AndroidFacetType());
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:6,代码来源:BlazeAndroidProjectPathsTest.java


示例14: registerFacet

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
private void registerFacet()
{
    FacetTypeRegistry facetTypeRegistry = FacetTypeRegistry.getInstance();
    facetTypeRegistry.registerFacetType( polygeneFacetType );
}
 
开发者ID:apache,项目名称:polygene-java,代码行数:6,代码来源:PolygeneApplicationComponent.java


示例15: unregisterFacet

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
private void unregisterFacet()
{
    FacetTypeRegistry facetTypeRegistry = FacetTypeRegistry.getInstance();
    facetTypeRegistry.unregisterFacetType( polygeneFacetType );
}
 
开发者ID:apache,项目名称:polygene-java,代码行数:6,代码来源:PolygeneApplicationComponent.java


示例16: getFacetType

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
public static FacetType<SlingModuleFacet, SlingModuleFacetConfiguration> getFacetType() {
    return FacetTypeRegistry.getInstance().findFacetType(ID);
}
 
开发者ID:headwirecom,项目名称:aem-ide-tooling-4-intellij,代码行数:4,代码来源:SlingModuleFacet.java


示例17: getFacetType

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
public static FacetType<AppEngineFlexibleFacet, AppEngineFlexibleFacetConfiguration>
    getFacetType() {
  return FacetTypeRegistry.getInstance().findFacetType(AppEngineFlexibleFacetType.ID);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:5,代码来源:AppEngineFlexibleFacet.java


示例18: getFacetType

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
public static FacetType<AppEngineStandardFacet, AppEngineStandardFacetConfiguration>
    getFacetType() {
  return FacetTypeRegistry.getInstance().findFacetType(AppEngineStandardFacetType.ID);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:5,代码来源:AppEngineStandardFacet.java


示例19: getFacetType

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@NotNull
public static DefracFacetType getFacetType() {
  return (DefracFacetType) FacetTypeRegistry.getInstance().findFacetType(ID);
}
 
开发者ID:defrac,项目名称:defrac-plugin-intellij,代码行数:5,代码来源:DefracFacet.java


示例20: getFacetType

import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
public static XmlBeansFacetType getFacetType() {
  return (XmlBeansFacetType)FacetTypeRegistry.getInstance().findFacetType(FACET_TYPE_ID);
}
 
开发者ID:bsblabs,项目名称:intellij-xmlbeans-plugin,代码行数:4,代码来源:XmlBeansFacetType.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AEADBlockCipher类代码示例发布时间:2022-05-21
下一篇:
Java Guardian类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap