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 186266 - A small API modification is required for fixing the issue #166177
Summary: A small API modification is required for fixing the issue #166177
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: XAM (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: apireviews
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 166177
  Show dependency tree
 
Reported: 2010-05-17 20:00 UTC by Nikita Krjukov
Modified: 2010-05-25 16:59 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
the main changes (5.72 KB, text/plain)
2010-05-17 20:00 UTC, Nikita Krjukov
Details
Diff file with all changes including notes Y01 - Y04 (27.30 KB, text/plain)
2010-05-18 15:23 UTC, Nikita Krjukov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Krjukov 2010-05-17 20:00:59 UTC
Created attachment 99106 [details]
the main changes

It's necessary to add a new parameter to method prepareChangeInfo(). 
I tried doing without this modification but it caused another issue #186068 in WSDL model. 

I kept the old method in order to prevent possible binary incompatibility. Actually, it seems there is binary and source compatibility, but the old method isn't going to be called by XDM model after my modification. So if it is redefined somewhere, modification will cause problems with synchronization. So I'm not absolutely sure if it worth to keep the old method. Maybe deletion would do my changes more visible.

The method is mainly intended to be used only as an interaction between XDM and XAM modules. But it's also redefined by following models (in trunk):

-- iep.editor/src/org/netbeans/modules/iep/model/impl/IEPModelImpl.java
-- websvc.rest.wadl.model/src/org/netbeans/modules/websvc/rest/wadl/model/impl/WadlModelImpl.java
-- wlm.model/src/org/netbeans/modules/wlm/model/impl/WLMModelImpl.java
-- xml.wsdl.model/src/org/netbeans/modules/xml/wsdl/model/impl/WSDLModelImpl.java
-- xslt.model/src/org/netbeans/modules/xslt/model/impl/XslModelImpl.java

The required modification is primitive, so I'm going to change them everywhere and together with main fix. 

The good news is that the method wasn't documented well, so there is strong hope that it isn't redefined frequently. 

I suppose to do the modification after the new 6.9 branch appears. But if will be postponed or you consider my modifications not dangerous, then I can push them before. 

See the main modifications in the attached file.
Comment 1 Nikita Krjukov 2010-05-17 20:20:17 UTC
I'd glad to get a recommendation about version number field in xml.xam/apichanges.xml
Comment 2 Jaroslav Tulach 2010-05-18 08:50:29 UTC
Looks compatible. Good.

Y01 The diff does not include change to module version (manifest or project.properties)
Y02 Use @since tag in the new method's javadoc
Y03 All modules that use this new method need to update their project.xml dependencies
Y04 I see no test.
Comment 3 Nikita Krjukov 2010-05-18 15:18:34 UTC
Great thanks for your mentioning!

Y01 I increased version in project.properties from 1.10.0 --> 1.10.1 
But honestly, I'm not sure if it is correct. Maybe 1.10.0 --> 1.11.0 is better? 

Y02 @since is added for the new method inside of AbstractDocumentModel

Y03 I renewed dependencies in project.xml files: 
iep.editor/nbproject/project.xml
websvc.rest.wadl.model/nbproject/project.xml
wlm.model/nbproject/project.xml
xml.xdm/nbproject/project.xml
xslt.model/nbproject/project.xml

Y04 The test for issue #166177 has been written before. It is located here: 
Module: XML Document Model (xml.xdm)
Class: org.netbeans.modules.xml.xam.NsPrefixCreationUndoTest
Method: testUndoNsPrefixCreation()
http://hg.netbeans.org/main/file/f511be5a98a1/xml.xdm/test/unit/src/org/netbeans/modules/xml/xam/NsPrefixCreationUndoTest.java

See all changes in additional attached diff file
Comment 4 Nikita Krjukov 2010-05-18 15:23:23 UTC
Created attachment 99146 [details]
Diff file with all changes including notes Y01 - Y04
Comment 5 Jaroslav Tulach 2010-05-19 08:33:31 UTC
1.11 is better. Modules in trunk usually increment their minor (2nd) number when doing compatible changes. 3rd digit is left for patch updates on branches (like releaseXY clone/branch).
Comment 6 Nikita Krjukov 2010-05-19 13:54:02 UTC
I changed new version to 1.10.1 --> 1.11
Comment 7 Nikita Krjukov 2010-05-25 16:59:24 UTC
Changes pushed to trunk