This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 195103 - Refactoring changes a changed filename incorrectly in the html <script> tag
Summary: Refactoring changes a changed filename incorrectly in the html <script> tag
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-06 14:54 UTC by onman
Modified: 2011-02-10 11:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description onman 2011-02-06 14:54:46 UTC
Product Version = NetBeans IDE 7.0 Beta (Build 201011152355)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_23
Runtime = Java HotSpot(TM) Client VM 19.0-b09

My project contains, among others, these files:
index.php
TBuilder.js

Index.php contains mainly html code.
In the <head> section I have a <script> tag as follows:
	<script type="text/javascript" src="javascript/Tao/Core/TBuilder.js"></script>

Now I want to rename the file TBuilder.js into TAdvancedBuilder.js using refactoring.
To do this I right click the file TBuilder.js in the 'projects' pane (top left of the screen) and choose Refactor and then Rename.
Next I enter the new filename and click Preview.
In the preview refactoring I click the button to do all proposed changes. This results in the script tag mentioned above to be changed into:
	<script type="text/javascript" src=javascript/Tao/Core/TAdvancedBuilder.jss"></script>
Note that the opening " of the src attribute has disappeared and also the extension was changed from .js to .jss .
It looks like the new string is placed 1 index position too early.

Enjoy.
Comment 1 Petr Pisl 2011-02-08 13:28:18 UTC
This looks like web refactoring problem. Marek is't yours?
Comment 2 Marek Fukala 2011-02-09 08:18:11 UTC
reproducible, this happens if the html code is parsed using html5 parser.
Comment 3 Marek Fukala 2011-02-09 10:47:23 UTC
fixed in web-main#5b7704fdcca5
Comment 4 Marek Fukala 2011-02-09 10:47:23 UTC
fixed in web-main#5b7704fdcca5
Comment 5 Quality Engineering 2011-02-10 11:31:28 UTC
Integrated into 'main-golden', will be available in build *201102100500* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/5b7704fdcca5
User: Marek Fukala <mfukala@netbeans.org>
Log: #195103 - Refactoring changes a changed filename incorrectly in the html <script> tag