Community
Participate
Working Groups
Smoke for 20030916 1) Open TestCase.java 2) add method "void static m() {}" 3) select m in outliner 4) DEL -> you are asked to save which should not happen 5) Confirm deletion of m -> m still there, nothing deleted Note, if m has no error deleting after confirmation works.
The problem is that the name range of the source method is bogus. For the given method I get the following results: iMember.getNameRange() == [offset=4767, length=-4767] iMember.getSourceRange()== [offset=4760, length=13] Moving to JDT/Core for comments.
The method declaration is syntactically incorrect. While in recovery mode, a SourceConstructorDeclaration is created, then it is converted in a MethodDeclaration since its selector doesn't match the type name. This means that the selectorSourceEnd is lost. Changed TypeDeclaration.checkConstructor(Parser) to redirect to the parser (using convertToMethodDeclaration(...)). The SourceElementParser nows overides this method to convert the SourceConstructorDeclaration into a SourceMethodDeclaration. Added regression test GetSourceTests.testNameRangeMethodWithSyntaxError.
Verified.