Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleType is deprecated #913

Open
SingingBush opened this issue Dec 11, 2023 · 0 comments
Open

ModuleType is deprecated #913

SingingBush opened this issue Dec 11, 2023 · 0 comments

Comments

@SingingBush
Copy link
Member

We need to remove com.intellij.openapi.module.ModuleType from the plugin.xml:

<moduleType id="DLANGUAGE_MODULE" implementationClass="io.github.intellij.dlanguage.module.DlangModuleType"/>

and instead re-implement use cases using the correct approach. See notes regarding changes:

Defines a technology (language, framework, etc) to which a particular 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 of com.intellij.ide.util.projectWizard.ModuleBuilder 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 com.intellij.facet.Facet or com.intellij.openapi.roots.ui.configuration.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant