Bug 24626 - codeSelect - does not work in catch clause
Summary: codeSelect - does not work in catch clause
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M3   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-10 09:20 EDT by David Audel CLA
Modified: 2002-11-13 05:41 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2002-10-10 09:20:19 EDT
build 20021008
1) create class X.
public class X extends Exception {
   public class Y extends Exception {
   }
}
2) create class Z.
public class Z {
   void foo() {
      try{
      } catch(X.Y e) {
      }
   }
}
3) select 'Y' in class Z.
4) press F3.
code select did not work.
Comment 1 David Audel CLA 2002-11-05 05:19:20 EST
Inside SelectionParser replace :
protected void consumeFormalParameter() {
   if (this.indexOfAssistIdentifier() < 0) {
      super.consumeFormalParameter();
   } else {
      ...
   }
}

by :
protected void consumeFormalParameter() {
   if (this.indexOfAssistIdentifier() < 0) {
      super.consumeFormalParameter();
      if((!diet || dietInt != 0) && astPtr > -1) {
         Argument argument = (Argument) astStack[astPtr];
         if(argument.type == assistNode) {
            isOrphanCompletionNode = true;
            this.restartRecovery = true; // force to restart in recovery mode
            this.lastIgnoredToken = -1;	
         }
      }
   } else {
      ...
   }
}

Fixed.
Comment 2 David Audel CLA 2002-11-13 05:41:27 EST
Verified.