Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341485

Summary: [1.7][navigate] "Open declared type" does not navigate to LUB for a multi-catch's argument
Product: [Eclipse Project] JDT Reporter: Ayushman Jain <amj87.iitr>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, markus.kell.r
Version: 3.7   
Target Milestone: 3.7.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 340059    
Bug Blocks:    
Attachments:
Description Flags
Fix 2 (catch up with bug 228376) none

Description Ayushman Jain CLA 2011-03-31 09:57:10 EDT
BETA_JAVA7

class Test{
    void foo() {
			try {

			   boo(1);
			   boo(2);
				
			} catch (IndexOutOfBoundsException | IllegalArgumentException e) {
				e.getCause();
			}
    }


    int boo(int i) throws IndexOutOfBoundsException, IllegalArgumentException{
        if (i ==1 )
            throw new IndexOutOfBoundsException();
        if (i == 2)
            throw new IllegalArgumentException();
        return 1;
    }
}

In the above case using CTRL+Click on 'e' and chosing "open declared type" takes me to IOOBE.

Expected: Either navigate to RuntimeException, or provide the user an option to navigate to one of the disjunctive types (i'm not sure if the latter is possible though with the current infrastructure).
Comment 1 Markus Keller CLA 2011-04-01 08:37:45 EDT
> In the above case using CTRL+Click on 'e' and chosing "open declared type"
> takes me to IOOBE.

That's because of bug 340059 comment 6:
>> I hacked the code so that it won't blow up with an exception
>> during live demos.

Once the selection engine returns the disjunctive type, we can start using this in the UI. It's probably best to show separate hyperlinks for all parts of the disjunctive type (more convenient for the user and also contains a hint that the declared type is a bit special).
Comment 2 Markus Keller CLA 2011-04-11 11:09:11 EDT
Created attachment 192939 [details]
Fix 2 (catch up with bug 228376)
Comment 3 Markus Keller CLA 2011-04-11 11:10:40 EDT
Fixed in BETA_JAVA7.
Comment 4 Jay Arthanareeswaran CLA 2011-07-20 09:55:39 EDT
Verified.