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.
Created attachment 127656 [details] ReplaceHistory API Diff There is need for replace history api same as search history is. I am submitting my first draft. It needs new module versions, describing api changes.
Created attachment 127720 [details] ReplaceHistory API Diff New API in Search API for ReplaceHistory. I have identical implementation as in SearchHistory. There is one example use - remembering replace expressions after netbeans restart. Please evaluate.
JH01: Please add @since tags to JavaDoc for new classes and methods. JH02: Dependency version in editor.search was not increased to 1.8. Otherwise the patch seems fine to me. Thank you!
Created attachment 127729 [details] Fix ReplaceHistory API Diff @JH01: Fixed @JH02: Thanks, for catching this one. Fixed.
Created attachment 127731 [details] ReplaceHistory API Diff Fixed editor.search dependency from 1.7 to 1.8
Y01 The description of the use cases should be in arch.xml or javadoc, but apichanges.xml should rather be just a small pointer to the new functionality. Y02 A usecase description for the whole new API would be good, imho. Y03 ReplacePattern javadoc is a bit minimalistic, imho. Some methods are missing javadoc altogether. Y04 Some weird synchronization pattern. Why getReplacePatterns() is synchronized? It only wraps another collection with Collections.unmodifiableList(replacePatternsList). For that you either don't need to synchronize at all, or if replacePatternsList is modifiable, then the current synchronization is broken anyway. ...and then I got lost in the patch, sorry...
Created attachment 128146 [details] ReplaceHistory API Diff
@Y01 removed details in apichanges.xml @Y02 added usecase to arch.xml @Y03 extended some javadoc - still minimalistic as is in search history. There is not too much done by api, so the name of methods and some javadoc seems enough. @Y04 removed keyword synchronized - it was there from old implementation. I didn't notice its uselessness Thank you for reviewing. The API is intended for use only for search in projects and search in netbeans.
http://hg.netbeans.org/jet-main/rev/a450f0a3680f
Integrated into 'main-golden', will be available in build *201211220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a450f0a3680f User: Milutin Kristofic <mkristofic@netbeans.org> Log: #221993 - Implement replace history api