Custom language plugin is not working
Answered
Hello all, my plugin doesn't want to work, it cant determine my type after Run.
https://github.com/punkkk/molplugin its my code.
Please sign in to leave a comment.
The plugin code looks ok at first glance. Is the plugin really loaded in the IDE? Is it shown in File | Settings | Plugins? If it is could you please run IDE with debugger and put a breakpoint into TreeFileTypeFactory to see if it is invoked?
Hm... Nope, it isn not in Plugins. But why?
I am working under linux.
How do you start the IDE with plugin? Do you use 'Plugin' run configuration? Are there any errors in idea.log?
Yep, i do.
Log:
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=250m; support was removed in 8.0
Connected to the target VM, address: '127.0.0.1:46648', transport: 'socket'
[ 15059] WARN - .intellij.diagnostic.VMOptions - VM options file path missing
[ 32566] WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: editor for id: editor.preferences.import
Disconnected from the target VM, address: '127.0.0.1:46648', transport: 'socket'
Process finished with exit code 0
I've tried to checkout your sources and run the plugin and it works perfectly for me. Looks like the problem is in your project configuration. Could you please publish the project configuration files (.idea directory and *.iml files) to GitHub?
Ok. :)
Here is it https://github.com/punkkk/toforum/tree/master/folder
And i have new question. http://www.jetbrains.org/intellij/sdk/docs/tutorials/custom_language_support/grammar_and_parser.html section 3.3 contains:
mixin="com.simpleplugin.psi.impl.SimpleNamedElementImpl"
implements="com.simpleplugin.psi.SimpleNamedElement"
But it isnot in previous parts. I've renamed it to "TreeNamedElement" but its make a error that "TreeNamedElement" is not exists. What is wrong with it?)
The plugin isn't loaded because its plugin.xml file isn't added to classpath when IDEA is started. You can either move META-INF/plugin.xml to resources directory or specify path to the plugin.xml file on 'Plugin Deployment' tab of the module editor in 'Project Structure' dialog. We should show an explicit warning in such cases, I've created an issue about that.
Regarding missing classes in a language plugin: did you try to create the mentioned classes by hand? Sources of SimpleNamedElement can be found in the sample plugin sources.
I just added plugin.xml to "plugin deployment", but it's still not working.
"handbook" does not contain information about it.
What am i doing wrong? :(
What do you mean by 'not working'? Is the plugin still not shown in Settings | Plugins? If so, is plugin.xml file copied to the plugin directory under the plugins 'Sandbox Home' (its path is specified by '-Didea.plugins.path=' parameter in the command line shown in 'Run' toolwindow when the plugin Run configuration is started)?