How to properly create a jdk5-style 'package-info.java' under IDEA 6?

... without having to manually include the 'package ]]>;' instruction into a plain text file?

5 comments

Not everybody at once, please @|:) surely I'm not the only one out there writing proper documentation with IDEA ??

0

Hello Sergei,

Not everybody at once, please @|:) surely I'm not the only one out
there writing proper documentation with IDEA ??


The easiest way is probably to create a file template with the PACKAGE_NAME
predefined var.

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


0

The easiest way is probably to create a file template
with the PACKAGE_NAME predefined var.


Good point. But when I rename the package will IDEA catch it? (I suppose it will if I check the "search occurrences in text files" options or something to that effect?)

Thanks for the tip.

P.S. Would be nice to have built-in support for package-info.java files out of the box though...

0

Sadly, it doesn't work: the following template (which is what is needed) produces a "Cannot Create Class: This template did not produce Java class nor interface!" error:

/**

  • $ */ package $;

0

Please sign in to leave a comment.