j2ee fileTemplates

For some reason, my file template isn't getting used when creating a j2ee module.

The template is in fileTemplates/j2ee/blah.xml.ft in my plugin jar (if it isn't there, I get an error), and it definitely contains stuff. However, when I create the module, the resultant blah.xml file is blank, and doesn't contain the text it needs to.

Now this might be a wild guess, but I'm suspecting a dodgy resource copy method, whereby you're checking for 0 for end of file, rather than -1 or something (and the symptom would be that it works on windows, but not on certain file sizes on OSX).

11 comments
Comment actions Permalink

Hani Suleiman wrote:

For some reason, my file template isn't getting used when creating a j2ee module.

The template is in fileTemplates/j2ee/blah.xml.ft in my plugin jar (if it isn't there, I get an error), and it definitely contains stuff. However, when I create the module, the resultant blah.xml file is blank, and doesn't contain the text it needs to.

Now this might be a wild guess, but I'm suspecting a dodgy resource copy method, whereby you're checking for 0 for end of file, rather than -1 or something (and the symptom would be that it works on windows, but not on certain file sizes on OSX).


Is that possible to take a look at the blah.xml? I could easily validate if that really Mac problem.

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Here you go!



Attachment(s):
orion-web.xml.ft
0
Comment actions Permalink

Hani Suleiman wrote:

Here you go!

Works fine for me

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Do you see your template in IDE Settings->File Templates?

--
Olesya Smirnova
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Hani Suleiman" <hani@formicary.net> wrote in message
news:1417094.1086740652739.JavaMail.itn@is.intellij.net...

For some reason, my file template isn't getting used when creating a j2ee

module.
>

The template is in fileTemplates/j2ee/blah.xml.ft in my plugin jar (if it

isn't there, I get an error), and it definitely contains stuff. However,
when I create the module, the resultant blah.xml file is blank, and doesn't
contain the text it needs to.
>

Now this might be a wild guess, but I'm suspecting a dodgy resource copy

method, whereby you're checking for 0 for end of file, rather than -1 or
something (and the symptom would be that it works on windows, but not on
certain file sizes on OSX).
>


0
Comment actions Permalink

Yes, it shows up correctly, with the right name and contents. Yet when I create a new web module, my descriptor does get created but its contents are blank.

Would it help if I send you my plugin so you can test it?

0
Comment actions Permalink

Yes, of course. I'd be great!

lesya@intellij.com

--
Olesya Smirnova
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Hani Suleiman" <hani@formicary.net> wrote in message
news:27190204.1086965597074.JavaMail.itn@is.intellij.net...

Yes, it shows up correctly, with the right name and contents. Yet when I

create a new web module, my descriptor does get created but its contents are
blank.
>

Would it help if I send you my plugin so you can test it?



0
Comment actions Permalink

Hani Suleiman wrote:

Yes, it shows up correctly, with the right name and contents. Yet when I create a new web module, my descriptor does get created but its contents are blank.

Would it help if I send you my plugin so you can test it?


Just checked against 2111. Works fine on both Mac and Windows. What IDEA build you're using BTW?

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

2111. Something very odd is going on!

0
Comment actions Permalink

Could you try your plugin with an IDEA installation in some new place?
Whithout copying any configs. Did you change some environment variables? Can
you try it on another computer?
--
Olesya Smirnova
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Hani Suleiman" <hani@formicary.net> wrote in message
news:17624723.1087182772960.JavaMail.itn@is.intellij.net...

2111. Something very odd is going on!



0
Comment actions Permalink

Aha, all working now, after deleting all the caches from my system dir!

0
Comment actions Permalink

/storm of applause/ :)

--
Olesya Smirnova
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Hani Suleiman" <hani@formicary.net> wrote in message
news:21689671.1087245747749.JavaMail.itn@is.intellij.net...

Aha, all working now, after deleting all the caches from my system dir!



0

Please sign in to leave a comment.