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.
Harsha found this problem with 2.24. I verified it with 2.25. Harsha reports: When I use netbeans WSIT plugin and edit some webservice attributes, but then press the cancel button, if I have the corresponding wsit file open in the editor, the changes remain in the file with a "*" displayed next to the file name indicating it is not saved. Suppose I want to save this file, there is no way to do it, because the save button is disabled. If I close the file, there is no warning that the changes will be lost. I would expect as a user that when I press cancel button, my changes should disappear from the file even if it is open. Or there should be an option to save or discard the changes manually afterwards. In the absence of either of these, the user will get confused.
This appears to be a problem of xml/wsdl modules or editor itself, as we are cancelling the changes and call dataObject.setDirty(false) at the end, which appropriately works on Saveall buttons
This does not seem to occur anymore.
Reproduceable in Product Version: NetBeans IDE Dev (Build 200802041203) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: SunOS version 5.10 running on x86; ISO646-US; en (nb) Userdir: /Users/lautz/.netbeans/dev I think the following scenario reflects what the original reporter was seeintg: 1. Define a Web application. 2. Define a new Web service. 3. Define a simple operation, like a simple echo that takes in input String parm and returns the same String. 4. Click any checkbox under Quality of Service. 5. Find the wsit*.xml file under Web pages/WEB-INF, and open it in the xml editor. 6. Choose the Advanced button under Quality of Service. 7. Click the Cancel button in the dialog. ==> Note that the wsit*.xml file thinks it's been changed.
I dont think this is a problem with wsdl editor. I can open the WSIT editor and click on operation and then change it to mandatory. I see in the wsdl source view, the new components are added and when I cancel the changes, nothing changes in the source view. The WSIT editor does not seem to be rolling back the changes.
Reassigning to Martin
Hmm, I just checked through the code, and WSIT editor does undo the changes (there are no changes in the file, also diff doesn't show anything), and it also calls dataObject.setModified(false) to assure it. However, the status of the file in the editor doesn't change. That's why I assume the problem is below WSIT editor. If you think otherwise, please provide input on what's wrong with the underlying model on your side after these changes happen.
I tried as per the second instruction from jlautz and don't see any issues here. In any case, if some web service model is mutating a xml document, I don't understand why should xml be responsible for saving, not saving, canceling. Please debug further.
I put in a workaround fix for this - at least the jlautz steps should have been fixed. It does not fix the main cause of the problem (most likely in XML editor itself as I described initially), but it appears to work.
I see that the file under Web pages/WEB-INF has the "*" indicating it has been modified and should be saved. This is present once any check box is selected then deselected after selecting the advanced button for a web service. Product Version: NetBeans IDE Dev (Build 200807100006) Java: 1.6.0_05; Java HotSpot(TM) 64-Bit Server VM 1.6.0_05-b13-52 System: Mac OS X version 10.5.4 running on x86_64; MacRoman; en_US (nb)
Ah, sorry, forgot to push to main repo. It was pushed just now.
Fix Verified Product Version: NetBeans IDE Dev (Build 200807101204) Java: 1.6.0_05; Java HotSpot(TM) 64-Bit Server VM 1.6.0_05-b13-52 System: Mac OS X version 10.5.4 running on x86_64; MacRoman; en_US (nb)