netbeans
netbeans copied to clipboard
Editor Utilities to LineDocumentUtils migration
Switched to non-deprecated editor utilities API.
PR is split into commits which usually handle a method pair.
note to first commit:
LineDocumentUtils unfortunately broke symmetry in getLine[Start/End]:
getLineStartdidn't declareBadLocationExceptionto be thrown and did not have any range checksgetRowStartdeclaredBadLocationExceptionbut calledgetLineStartwhich can't throw theException
to resolve this I had to add getLine[Start/End]Offset and deprecate getLine[Start/End]:
getLine[Start/End]Offsetchecks the range and declaresBadLocationException, just like thegetLineEndsibling did.- this makes the API symmetrical and allows the try-catch blocks (which had to be already implemented) to function
its ugly but this was the best option I came up with.
duplicated code strikes again
rebasing. planning to merge this this week assuming everything is ok.
fixed a few mistakes, will merge once green. then proceed with the maven update PR.