public abstract class ModuleType<T extends ModuleBuilder>
extends java.lang.Object
Module
instance is related. Each Module
belongs to
some type (see get(Module)
) and it can be used to provide custom UI for New Project and Project Structure dialogs, and
to customize other feature of the IDE (e.g. enable some actions only for files in modules of a specific type).
Module Type concept is considered as outdated. Enabling some features only in modules of a specific type makes it harder to mix different technologies in the same source directory, and cause conflicts in configuration files when the same directory is opened in different IDEs.
If you need to show special kinds of projects in New Project wizard, register an implementation ofModuleBuilder
as an extension instead. If you
need to allow users to configure something related to some technology in the IDE, use projectConfigurable
for project-level settings and Facet
or ModuleConfigurationEditorProvider
for module-level settings.
If you need to make an action enabled in presence of a specific technology only, do this by looking for required files in the project
directories, not by checking type of the current module.Modifier and Type | Field and Description |
---|---|
static ModuleType<?> |
EMPTY |
Modifier | Constructor and Description |
---|---|
protected |
ModuleType(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
abstract T |
createModuleBuilder() |
ModuleWizardStep [] |
createWizardSteps(WizardContext wizardContext,
T moduleBuilder,
ModulesProvider modulesProvider) |
boolean |
equals(java.lang.Object o) |
static ModuleType |
get(Module module) |
FrameworkRole |
getDefaultAcceptableRole() |
abstract java.lang.String |
getDescription() |
javax.swing.Icon |
getIcon() |
java.lang.String |
getId() |
abstract java.lang.String |
getName() |
abstract javax.swing.Icon |
getNodeIcon(boolean isOpened) |
int |
hashCode() |
static boolean |
is(Module module,
ModuleType moduleType) |
static boolean |
isInternal(Module module) |
boolean |
isMarkInnerSupportedFor(JpsModuleSourceRootType type) |
boolean |
isSupportedRootType(JpsModuleSourceRootType type) |
boolean |
isValidSdk(Module module,
Sdk projectSdk) |
ModuleWizardStep |
modifyProjectTypeStep(SettingsStep settingsStep,
ModuleBuilder moduleBuilder) |
ModuleWizardStep |
modifySettingsStep(SettingsStep settingsStep,
ModuleBuilder moduleBuilder) |
java.lang.String |
toString() |
public static final ModuleType<?> EMPTY
public abstract T createModuleBuilder()
public abstract java.lang.String getName()
public abstract java.lang.String getDescription()
public javax.swing.Icon getIcon()
public abstract javax.swing.Icon getNodeIcon(@Deprecated boolean isOpened)
public ModuleWizardStep [] createWizardSteps(WizardContext wizardContext, T moduleBuilder, ModulesProvider modulesProvider)
public ModuleWizardStep modifySettingsStep(SettingsStep settingsStep, ModuleBuilder moduleBuilder)
public ModuleWizardStep modifyProjectTypeStep(SettingsStep settingsStep, ModuleBuilder moduleBuilder)
public final java.lang.String getId()
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static boolean is(Module module, ModuleType moduleType)
public static boolean isInternal(Module module)
public static ModuleType get(Module module)
public FrameworkRole getDefaultAcceptableRole()
public boolean isSupportedRootType(JpsModuleSourceRootType type)
public boolean isMarkInnerSupportedFor(JpsModuleSourceRootType type)