FileTemplate Creation
I'm at wits end here.
I have the following structure
/src/fileTemplates/j2ee/OCPForm.java.ft
/src/fileTemplates/j2ee/OCPForm.html.ft
I have a class that implements FileTemplateGroupDescriptorFactory and ApplicationComonent and registered in my plugin xmlwith the following code
public FileTemplateGroupDescriptor getFileTemplatesDescriptor()
{
FileTemplateGroupDescriptor groupDescriptor = new FileTemplateGroupDescriptor("OCPHelper Descriptor", OCPHelperConstants.FRY_ICON);
groupDescriptor.addTemplate(new FileTemplateDescriptor("OCPForm.java"));
return groupDescriptor;
}
I don't ever see this run though. I'm also unable to createClass with this template. What else am I missing here? I've used most of the code from the DevKit. Not sure what else i need.
Please sign in to leave a comment.
I ended up getting it working by clearing the plugin-sandbox cache. I'll post more on this in the morning - time for sleep now.
Hello Shaun,
If you're targeting IDEA 8, you shouldn't implement ApplicationComponent
on this class. Instead, the recommended way is to register classes implementing
the FileTemplateGroupDescriptorFactory via the ]]> extension
in plugin.xml.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I wl be targeting 7 at first with a few people on 8. I have implemented it as an APplicationComonent so far. Do I need to implement this as the extension for this to work in IntelliJ8 as well or can I leave it as is?
Hello Shaun,
Registration as ApplicationComponent works in IDEA 8, but it may stop working
in future IDEA versions.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"