FrameworkSupportprovider and JavaModuleType
My implementation of FrameworkSupportProvider class, does not recognize JavaModuleType when I do the following check:
public boolean isEnabledForModuleType(@NotNull ModuleType moduleType) {
return moduleType instanceof JavaModuleType;
}
But when I set a breakpoint in this method, it clearly shows a com.intellij.openapi.module.JavaModuleType being passed in as a parameter. Is there any reason why Idea won't recognize JavaModuleType, or is my plugin environment broken?
(Running IntelliJ 9.0 build #UI-93.13 on Fedora 11, v 2.6.30.9-99.fc11.x86_64)
Please sign in to leave a comment.
Hello WarnerJan,
Make sure that you didn't add any of IDEA libraries to the classpath of your
plugin. If you do need to add some jars (like idea.jar or the JavaEE plugin
jar), you need to add them to the classpath of the IDEA JDK.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
JavaModuleType isn't included in OpenAPI so in order to use it from the plugin you need to add idea.jar to IDEA Sdk configuration.
By the way JavaModuleType has no derived classes in IDEA so you can avoid using non-API classes by replacing "moduleType instanceof JavaModuleType"
with "moduleType.equals(StdModuleTypes.JAVA)".
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"