|
|
|
[
Permlink
| « Hide
]
Maxim Shafirov - 22 Jun 05 15:19
Do you have 'optimize imports on the fly' option enabled?
No, and the real problem is that those import were used in the code
I have the same problem.
I have a JSP page that uses an inclusion: <%@ include file="../statusHistoryTooltip.jsp.inc" %> The inclusion uses the page imports. When I commit and I forget to uncheck the "optimize import", some includes dissappear and the page is not compilable. The page uses also a variable "Iterator histoIt = mb.getStatusHistory().iterator();" that is used after by the include (I don't approuve at all this kind of tricks.. It is not MY code.), and it is detected as not used by Intellij. (build used:4155) I'm finding the same issue in Build 5784. IDEA seems to remove <%@ page import="" %> directives randomly. These removals show up in the local history and can be reinserted. However, it is unclear why IDEA is removing these imports at all.
This shows the imports that have disappeared showing up in the local history. They disappear repeatedly and without warning and usually I don't become aware of it until I deploy and get errors
To reproduce and fix.
Please, see attached improts.zip project. JSPs are in resources subdirectory. Container.jsp is valid (checked with IDEA's jasper) and contains dummy declarations with types, imported in fragment.jspf. Imports optimization removes imports from fragment.jspf and breaks validity of container.jsp. This can be the root of user's problem. Anyway, this is a bug to fix. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||