History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-13658
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Maxim Shafirov
Reporter: Matthieu Casanova
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

I don't know how it happened but all my imports disappeard in some jsp pages

Created: 22 Jun 05 15:09   Updated: 27 Mar 07 19:15
Component/s: J2EE.JSP
Fix Version/s: Selena 6791

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Zip Archive imports.zip (14 kb)

Image Attachments:

1. screenshot-1.jpg
(109 kb)
Issue Links:
Duplicate
 
This issue is duplicated by:
IDEADEV-8300 "Optimize imports" removes imports fr... Critical Closed

Build: 3,378
Fixed in build: 6,785
Severity: Extreme


 Description  « Hide
Hi, all imports disappeard in two jsp pages, I don't know how it happened.
I think I was working on a jsp that include those two jsp.
I tried to extract an include file (it failed, the include file was extracted but it wasn't called in my jsp, I had to do it myself ,and I got this exception)
http://www.intellij.net/tracker/idea/viewSCR?publicId=49579

 All   Comments   Work Log   Change History      Sort Order:
Maxim Shafirov - 22 Jun 05 15:19
Do you have 'optimize imports on the fly' option enabled?

Matthieu Casanova - 22 Jun 05 15:27
No, and the real problem is that those import were used in the code

pedro_cristian - 17 Mar 06 18:07
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)


Noel O'Sullivan - 08 Nov 06 04:27
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.

Noel O'Sullivan - 08 Nov 06 04:41
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

Alexander Chernikov - 23 Jan 07 13:57
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.