mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Revert "don't hardcode Java module type implementation"
This reverts commit 0cd9404d67.
This commit is contained in:
@@ -17,9 +17,21 @@ package com.intellij.openapi.module;
|
||||
|
||||
public class StdModuleTypes {
|
||||
// predefined module types
|
||||
public static ModuleType JAVA = ModuleTypeManager.getInstance().findByID("JAVA_MODULE");
|
||||
public static ModuleType JAVA;
|
||||
|
||||
private StdModuleTypes() {
|
||||
}
|
||||
|
||||
static {
|
||||
JAVA = instantiate("com.intellij.openapi.module.JavaModuleType");
|
||||
}
|
||||
|
||||
private static ModuleType instantiate(String className) {
|
||||
try {
|
||||
return (ModuleType)Class.forName(className).newInstance();
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user