本文整理汇总了Java中com.intellij.facet.FacetTypeRegistry类的典型用法代码示例。如果您正苦于以下问题:Java FacetTypeRegistry类的具体用法?Java FacetTypeRegistry怎么用?Java FacetTypeRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FacetTypeRegistry类属于com.intellij.facet包,在下文中一共展示了FacetTypeRegistry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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()]);
}
示例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);
}
});
}
示例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);
}
});
}
}
示例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);
}
示例9: getCreateElementIcon
import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@Override
public Icon getCreateElementIcon() {
return FacetTypeRegistry.getInstance().findFacetType(myFacetType).getIcon();
}
示例10: getItemIcon
import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@Override
protected Icon getItemIcon(F item) {
return FacetTypeRegistry.getInstance().findFacetType(myFacetType).getIcon();
}
示例11: getInstance
import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
public static BuildoutFacetType getInstance() {
return (BuildoutFacetType)FacetTypeRegistry.getInstance().findFacetType(ID);
}
示例12: getFacetType
import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
@NotNull
public static AndroidFacetType getFacetType() {
return (AndroidFacetType)FacetTypeRegistry.getInstance().findFacetType(ID);
}
示例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());
}
示例14: registerFacet
import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
private void registerFacet()
{
FacetTypeRegistry facetTypeRegistry = FacetTypeRegistry.getInstance();
facetTypeRegistry.registerFacetType( polygeneFacetType );
}
示例15: unregisterFacet
import com.intellij.facet.FacetTypeRegistry; //导入依赖的package包/类
private void unregisterFacet()
{
FacetTypeRegistry facetTypeRegistry = FacetTypeRegistry.getInstance();
facetTypeRegistry.unregisterFacetType( polygeneFacetType );
}