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 143210 - refactoring-rename performs formatting of XML files
Summary: refactoring-rename performs formatting of XML files
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker with 4 votes (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-07 18:02 UTC by andrei_khaisin
Modified: 2016-07-07 09:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
After.hbm.xml (1.25 KB, text/xml)
2009-06-30 23:02 UTC, danapsimer
Details
Before.hbm.xml (1.34 KB, text/xml)
2009-06-30 23:04 UTC, danapsimer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andrei_khaisin 2008-08-07 18:02:39 UTC
Steps:
1. Create Java or Web project
2. Add hibernate supporting
3. Add entity class and appropriate mapping file (entity.java and entity.hbm.xml)
4. Open entity.hbm.xml and format it (insert lines, tabs, spaces for better text look). Save.
5. Open entity.java and perform refactoring-rename of class name.
==> entity.hbm.xml has been formatted (all additional tabs,spaces has been removed)
This happens after refactoring of any other sources too.
Comment 1 Sonali Kochar 2008-08-19 18:56:29 UTC
Tony,

Can you reproduce this bug?

thx
Comment 2 jensdpersson 2008-09-09 14:02:05 UTC
Hello

I have the same problem, a whole bunch of hibernate hbm.xml files get reformatted once in a while. I run OS X Tiger.
Nb 6.1 
Comment 3 tonybeckham 2008-09-10 19:11:40 UTC
I have tried using We Project with Hibernate support but cannot reproduce the issue.

System:
Product Version: NetBeans IDE Dev (Build 200809100201)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.4 running on i386; MacRoman; en_US (nb)


@jensdpersson you say reformatted once in a while, can you provide steps for those times?  DO the steps in the firts
description work for you to reproduce?
Comment 4 tonybeckham 2008-09-10 19:30:53 UTC
Oh, now I see it.  I can reproduce with the steps.  The first time I tried with a Web Project but I don't think I had
all the setup correct.  With a java project I was able to reproduce.

Product Version: NetBeans IDE Dev (Build 200809100201)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.4 running on i386; MacRoman; en_US (nb)
Comment 5 bell 2008-11-28 13:33:18 UTC
I experience the same problem (primarily with hibernate hbm.xml files) with Netbeans 6.5 (final) on Windows.

I opened our maven (pom.xml) projects in NetBeans, and experience this error whenever I try to do a rename class
refactoring. Plain java projects.
Comment 6 danapsimer 2009-06-30 22:59:46 UTC
Issum #161628 seems to be a duplicate.

I was seeing this on 6.5 and disabling the hibernate plugin, which I rarely use even though I use hibernate extensively, fixed the issue.

Now on 6.7 the hibernate support does not seem to be a plugin so there is no way to disable it.  This needs to be escalated due because now it cannot be 
turned off!

Not only is the formatting annoying it is incorrect.  I have will attach two files ( before and after ) so that you can see what is wrong.  I use external entities to 
include shared type definitions and the reformatting mangles my entity declarations and removes their usages.
Comment 7 danapsimer 2009-06-30 23:00:20 UTC
Issum #161628 seems to be a duplicate.

I was seeing this on 6.5 and disabling the hibernate plugin, which I rarely use even though I use hibernate extensively, fixed the issue.

Now on 6.7 the hibernate support does not seem to be a plugin so there is no way to disable it.  This needs to be escalated due because now it cannot be 
turned off!

Not only is the formatting annoying it is incorrect.  I have will attach two files ( before and after ) so that you can see what is wrong.  I use external entities to 
include shared type definitions and the reformatting mangles my entity declarations and removes their usages.
Comment 8 danapsimer 2009-06-30 23:02:54 UTC
Created attachment 84209 [details]
After.hbm.xml
Comment 9 danapsimer 2009-06-30 23:04:44 UTC
Created attachment 84210 [details]
Before.hbm.xml
Comment 10 danapsimer 2009-07-01 18:19:01 UTC
I uninstalled the hibernate plugin in 6.7 ( Check "Show Details" on the Plugins->Installed tab to see the hibernate plugin ).  However that did not help.  The 
changes are still made whenever I do a Rename Refactoring. It does not matter what project I do the rename in.  In 6.5 uninstalling the hibernate plugin was a 
workaround but now it is not.
Comment 11 Martin Balin 2016-07-07 09:56:32 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss