Community
Participate
Working Groups
Replace usages of MethodDeclaration#thrownExceptions() in the AST. For jsr308, MethodDeclaration's thrownExceptions property has been replaced with thrownExceptionTypes. Make a pass over all JDT UI code that uses the old property in any way (direct access or via property descriptor) and update usages. File separate bugs if things get too complicated somewhere or if you think we should add new features for handling these constructs.
Created attachment 229281 [details] Patch The attached patch updates the usages of old 'thrownExceptions' property of MethodDeclaration in JDT UI code, except the usage in ExceptionOccurrencesFinder.
Created attachment 235754 [details] Updated Patch Updated the patch with JUnit fixes for thrownExceptionTypes.
In a few places, you replaced ASTNodeFactory.newName(fAST, fImportRewriter.addImport(exceptionType, context)) with ASTNodeFactory.newType(fAST, fImportRewriter.addImport(exceptionType, context)) The original code was a kludge from times before ImportRewrite could take an AST. I used the better replacement fImportRewriter.addImport(exceptionType, fAST, context) Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=c11b26a1362f47a11287b295af6e00b350648613 http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=4cfd5392c2e3139a9903acc170a1fb06f3bc06c8 doesn't look completely correct. The revert of ChangeMethodSignatureProposal is good, although this could break again when ImportRewrite considers annotations. JavadocTagsSubProcessor/LocalCorrectionsSubProcessor only worked for un-annotated types. A Javadoc @throws tag cannot contain annotations. Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=83079ba6f0bba9525f7776d99c306db57c54d2c0