com.intellij.openapi.module.StdModuleTypes Java Examples

The following examples show how to use com.intellij.openapi.module.StdModuleTypes. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlazeAndroidSyncPlugin.java    From intellij with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public ModuleType getWorkspaceModuleType(WorkspaceType workspaceType) {
  if (workspaceType == WorkspaceType.ANDROID) {
    return StdModuleTypes.JAVA;
  }
  return null;
}
 
Example #2
Source File: IntellijPluginSyncPlugin.java    From intellij with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public ModuleType getWorkspaceModuleType(WorkspaceType workspaceType) {
  if (workspaceType == WorkspaceType.INTELLIJ_PLUGIN) {
    return StdModuleTypes.JAVA;
  }
  return null;
}
 
Example #3
Source File: BlazeJavaSyncPlugin.java    From intellij with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public ModuleType getWorkspaceModuleType(WorkspaceType workspaceType) {
  if (workspaceType == WorkspaceType.JAVA) {
    return StdModuleTypes.JAVA;
  }
  return null;
}
 
Example #4
Source File: SpringBootModuleBuilder.java    From crud-intellij-plugin with Apache License 2.0 4 votes vote down vote up
@Override
public ModuleType getModuleType() {
	return StdModuleTypes.JAVA;
}
 
Example #5
Source File: ExternalSystemTestCase.java    From intellij-quarkus with Eclipse Public License 2.0 4 votes vote down vote up
protected Module createModule(String name) {
  return createModule(name, StdModuleTypes.JAVA);
}
 
Example #6
Source File: MavenTestCase.java    From intellij-quarkus with Eclipse Public License 2.0 4 votes vote down vote up
protected Module createModule(String name) {
  return createModule(name, StdModuleTypes.JAVA);
}
 
Example #7
Source File: DubboPluginModuleBuilder.java    From intellij-idea-plugin with Apache License 2.0 4 votes vote down vote up
@Override
public ModuleType getModuleType() {
    return StdModuleTypes.JAVA;
}
 
Example #8
Source File: NutzBootModuleBuilder.java    From NutzCodeInsight with Apache License 2.0 4 votes vote down vote up
@Override
public ModuleType getModuleType() {
    return StdModuleTypes.JAVA;
}
 
Example #9
Source File: BlazeAndroidProjectStructureSyncer.java    From intellij with Apache License 2.0 4 votes vote down vote up
/** Ensures a suitable module exists for the given android target. */
@Nullable
public static Module ensureRunConfigurationModule(Project project, Label label) {
  if (deprecateRunConfigModuleExperiment.isEnabled()) {
    return ModuleFinder.getInstance(project)
        .findModuleByName(BlazeDataStorage.WORKSPACE_MODULE_NAME);
  }
  TargetKey targetKey = TargetKey.forPlainTarget(label);
  String moduleName = moduleNameForAndroidModule(targetKey);
  Module module = ModuleFinder.getInstance(project).findModuleByName(moduleName);
  if (module != null) {
    return module;
  }

  BlazeProjectData blazeProjectData =
      BlazeProjectDataManager.getInstance(project).getBlazeProjectData();
  if (blazeProjectData == null) {
    return null;
  }
  AndroidSdkPlatform androidSdkPlatform = SdkUtil.getAndroidSdkPlatform(blazeProjectData);
  if (androidSdkPlatform == null) {
    return null;
  }
  TargetIdeInfo target = blazeProjectData.getTargetMap().get(targetKey);
  if (target == null) {
    return null;
  }
  if (target.getAndroidIdeInfo() == null) {
    return null;
  }
  // We can't run a write action outside the dispatch thread, and can't
  // invokeAndWait it because the caller may have a read action.
  if (!ApplicationManager.getApplication().isDispatchThread()) {
    return null;
  }

  BlazeSyncPlugin.ModuleEditor moduleEditor =
      ModuleEditorProvider.getInstance()
          .getModuleEditor(
              project, BlazeImportSettingsManager.getInstance(project).getImportSettings());
  Module newModule = moduleEditor.createModule(moduleName, StdModuleTypes.JAVA);
  ApplicationManager.getApplication()
      .runWriteAction(
          () -> {
            AndroidFacetModuleCustomizer.createAndroidFacet(newModule, true);
            moduleEditor.commit();
          });
  File moduleDirectory =
      moduleDirectoryForAndroidTarget(WorkspaceRoot.fromProject(project), target);
  updateModuleFacetInMemoryState(
      project,
      null,
      androidSdkPlatform,
      newModule,
      moduleDirectory,
      manifestFileForAndroidTarget(
          project,
          blazeProjectData.getArtifactLocationDecoder(),
          target.getAndroidIdeInfo(),
          moduleDirectory),
      target.getAndroidIdeInfo().getResourceJavaPackage(),
      ImmutableList.of(),
      false,
      null);
  return newModule;
}
 
Example #10
Source File: SlingMavenModuleBuilder.java    From aem-ide-tooling-4-intellij with Apache License 2.0 4 votes vote down vote up
public ModuleType getModuleType() {
    return StdModuleTypes.JAVA;
}
 
Example #11
Source File: RPiJavaModuleBuilder.java    From embeddedlinux-jvmdebugger-intellij with Apache License 2.0 4 votes vote down vote up
/**
 * Returns the Module type
 * @return
 */
@Override
public ModuleType getModuleType() {
    return StdModuleTypes.JAVA;
}
 
Example #12
Source File: AsposeMavenModuleBuilder.java    From Aspose.OCR-for-Java with MIT License 4 votes vote down vote up
public ModuleType getModuleType() {
    return StdModuleTypes.JAVA;
}
 
Example #13
Source File: AsposeMavenModuleBuilder.java    From Aspose.OCR-for-Java with MIT License 4 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
    return StdModuleTypes.JAVA.modifySettingsStep(settingsStep, this);
}
 
Example #14
Source File: PlatformFormatterTest.java    From EclipseCodeFormatter with Apache License 2.0 4 votes vote down vote up
@NotNull
protected ModuleType getModuleType() {
	return StdModuleTypes.JAVA;
}