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 186930

Summary: replace by XMLUtil when that has findElement, findText, etc.
Product: ide Reporter: mvfranz <mvfranz>
Component: CodeAssignee: issues@ide <issues>
Status: NEW ---    
Severity: normal CC: jglick
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 136595    
Bug Blocks:    
Attachments: Proposed patch with API for XMLUtil

Description mvfranz 2010-05-29 03:29:44 UTC
The following classes have the following comment 'replace by XMLUtil when that has findElement, findText, etc.'  The specified functionality exists in XMLUtil and should be used instead of the existing logic.

ant.freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java
cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/MakeProject.java
compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/IcanproProject.java
compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/JbiProject.java
edm.project/src/org/netbeans/modules/edm/project/EdmproProject.java
etl.project/src/org/netbeans/modules/etl/project/EtlproProject.java
iep.project/src/org/netbeans/modules/iep/project/IepProject.java
j2ee.archive/src/org/netbeans/modules/j2ee/archive/project/ArchiveProject.java
j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java
j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProject.java
j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java
java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java
javacard.project/src/org/netbeans/modules/javacard/project/JCProject.java
javacard.project/src/org/netbeans/modules/javacard/project/ProjectRenamer.java
mobility.project/src/org/netbeans/modules/mobility/project/J2MEProject.java
o.n.bluej/src/org/netbeans/bluej/BluejProject.java
ruby.project/src/org/netbeans/modules/ruby/rubyproject/RubyBaseProject.java
sql.project/src/org/netbeans/modules/sql/project/IcanproProject.java
sql.project/src/org/netbeans/modules/sql/project/SQLproProject.java
uml.project/src/org/netbeans/modules/uml/project/UMLProject.java
web.project/src/org/netbeans/modules/web/project/WebProject.java
wlm.project/src/org/netbeans/modules/workflow/project/WorkflowproProject.java
xslt.project/src/org/netbeans/modules/xslt/project/XsltproProject.java
Comment 1 mvfranz 2010-05-29 15:01:48 UTC
Reviewing the code in J2SEProject, I am thinking that there needs to be another method added to XMLUtil to make this code cleaner.  Something like updateOrInsertNode or replaceOrInsertNode to replace the bulk of these methods.  

The existing methods copyDocument and appendChildElement will not work, or do not make the code cleaner.
Comment 2 Sergey Lunegov 2010-05-29 16:11:46 UTC
This is for GF ESB. Alex, please evaluate.
Comment 3 mvfranz 2010-06-13 03:39:15 UTC
Created attachment 100040 [details]
Proposed patch with API for XMLUtil

I refactored listed projects to use new API methods in XMLUtil.
Comment 4 mvfranz 2010-06-22 23:39:09 UTC
Any interest in these changes?
Comment 5 Jesse Glick 2011-03-07 23:45:16 UTC
Filed in the wrong component.