Changes to Intellij SDK 8.0+ around FileTemplate and FileTemplateManager

Hi, I'm trying to get Wicketforge up and running for IDEA 8.x, and I've loaded the code up and the issue seems to be two missing types, com.intellij.ide.fileTemplates.FileTemplate and FileTemplateManager. According to the 8.0 SDK API, neither exists anymore. Is there something with similar functionality I could use instead? I can see FileTemplateDescriptors but they appear significantly different.

They are being used to load templates like so -

        final FileTemplate template = FileTemplateManager.getInstance().getJ2eeTemplate(templateName);

        String text;
        try {
            text = template.getText();
        }
        catch (Exception e) {
            throw new RuntimeException("Unable to load template for " + FileTemplateManager.getInstance().internalTemplateToSubject(templateName), e);
        }


Thanks in advance for any assistance.

4 comments
Comment actions Permalink

Hello Liam,

Make sure that idea.jar is added to the classpath of your IDEA JDK. These
two classes never were part of the OpenAPI, but they're still available in
8.0.

Hi, I'm trying to get Wicketforge up and running for IDEA 8.x, and
I've loaded the code up and the issue seems to be two missing types,
com.intellij.ide.fileTemplates.FileTemplate and FileTemplateManager.
According to the 8.0 SDK API, neither exists anymore. Is there
something with similar functiona

lity I could use instead? I can see FileTemplateDescriptors but they
appear significantly different.

They are being used to load templates like so -

 FileTemplateManager.getInstance().getJ2eeTemplate(templateName);
> String text;
> try {
> text = template.getText();
> }
> catch (Exception e) {
> throw new RuntimeException("Unable to load template for "
> +
> FileTemplateManager.getInstance().internalTemplateToSubject(templateNa
> me), e);
> }]]>

Thanks in advance for any assistance.

---
Original message URL:
http://www.jetbrains.net/devnet/message/5233452#5233452

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks Dmitry.

0
Comment actions Permalink

What's the proper way to approach this problem without using non-openAPI methods?  Should we continue to use them or is there another suggested approach?

0
Comment actions Permalink

Hello Shaun,

What's the proper way to approach this problem without using
non-openAPI methods? Should we continue to use them or is there
another suggested approach?


For the time being there is no other suggested approach. I hope that we'll
be able to move these classes to OpenAPI in IDEA 9.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.