Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 153150 - [65cat] refactor-moving JSPs between projects messes up code?!
[65cat] refactor-moving JSPs between projects messes up code?!
Status: VERIFIED FIXED
Product: javaee
Classification: Unclassified
Component: JSP
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Jan Pokorsky
issues@javaee
65fixes2-verified
:
: 148904 153865 154144 155402 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-13 14:53 UTC by kawazu428
Modified: 2009-02-19 23:26 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kawazu428 2008-11-13 14:53:49 UTC
[ BUILD # : 200811130201 ]
[ JDK VERSION : 1.6.0_07 ]

Copied a bunch of portlet page .jsps from one projects WEB-INF/jsp to
another project, same location.

Outcome: Each and every JSP subsequently was "decorated" with

package WEB-INF.jsp;

in the first line - which is obviously not that meaningful for a JSP.
Reproducibly happens like this in virtually any recent build. Adding
to this, if I move any of these JSPs elsewhere, say from
"WEB-INF/jsp" to "WEB-INF/foo", another line is added to the JSP
sources so to read

package WEB-INF.foo;

package WEB-INF.jsp;

Raising priority a little as this is enormously annoying whenever
refactoring bigger web / portlet projects...
Comment 1 Matthew Bohm 2008-11-20 06:08:35 UTC
*** Issue 148904 has been marked as a duplicate of this issue. ***
Comment 2 Matthew Bohm 2008-11-20 06:09:22 UTC
Changing subcomponent to refactoring.
Comment 3 _ wadechandler 2008-11-20 13:47:22 UTC
Issue 148904 has exact steps to reproduce every time.
Comment 4 _ wadechandler 2008-11-20 13:48:39 UTC
Too, I should add, this also happens copying between folders in the same project, and is what issue 148904 shows.
Comment 5 Jayashri Visvanathan 2008-11-26 05:18:32 UTC
Petr,
 Does this fall under jspeditor ? If not, please pass it back.
thanks
Comment 6 kawazu428 2008-11-26 10:55:24 UTC
Adding to this: Building portlet applications using maven2 keeping JSPs in WEB-INF/jsp/, this also does happen while
simply copying / pasting a JSP within this folder - the copy gets inserted as <jsp-name>_1.jsp and does also contain the
"package WEB-INF.jsp;" faulty package declaration which in turns gets displayed in the portlet - not so nice. :)
Comment 7 David Konecny 2008-11-27 00:16:36 UTC
*** Issue 153865 has been marked as a duplicate of this issue. ***
Comment 8 Petr Jiricka 2008-12-08 18:36:57 UTC
David or Marek, could you please evaluate/investigate? Thanks.
Comment 9 David Konecny 2008-12-08 20:09:13 UTC
*** Issue 154144 has been marked as a duplicate of this issue. ***
Comment 10 David Konecny 2008-12-09 01:43:05 UTC
This is regression caused by issue 144640. It is presented in 6.5 FCS but seems to be fixed in latest dev trunk. It has
happened partially because of issue 143542 (which exists since NB4.0).
Comment 11 Petr Jiricka 2008-12-09 08:41:25 UTC
David, thanks for the evaluation! I am cc'ing Honza Pokorsky, who did a fix for issue 144640, and Petr Slechta. Do you
know what is the trunk fix, and whether it can be backported to the 6.5 sustaining clone? Should this be assigned to
web/projects? Or to java/refactoring?

Comment 12 David Konecny 2008-12-09 10:26:45 UTC
It is problem only in web/jsp editor (for java refactoring there is no problem) so I left the issue component as is but
I assigned it to Honza to fix it. I have no idea why it works in trunk.
Comment 13 Jan Pokorsky 2008-12-09 13:00:28 UTC
The only relevant change to copy/move refactoring after branching release65 is
http://hg.netbeans.org/main/rev/ddd4f8eada1d (issue 151288).
Comment 14 Jan Pokorsky 2008-12-09 15:33:30 UTC
I have found out the reason why it works in the trunk. It is rewrite of JavaSource to Parsing API.
JavaSource.forFileObject returns null for jsp file now. So you can backport the Parsing API merge or the following
change set http://hg.netbeans.org/main/rev/29939ccf48bc. Both should work.
Comment 15 Quality Engineering 2008-12-11 05:56:24 UTC
Integrated into 'main-golden', will be available in build *200812110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/29939ccf48bc
User: Jan Pokorsky <jpokorsky@netbeans.org>
Log: #153150: CopyHandler should transform only java files
Comment 16 Marek Fukala 2008-12-15 08:17:19 UTC
*** Issue 155402 has been marked as a duplicate of this issue. ***
Comment 17 Jindrich Sedek 2009-01-12 12:32:29 UTC
verified.
NetBeans IDE Dev (Build 090112)
Comment 18 jinb 2009-01-14 15:16:55 UTC
fix backported into release65_fixes branch
http://hg.netbeans.org/release65_fixes/rev/a1b38ed3ed65


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo