Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341485 - [1.7][navigate] "Open declared type" does not navigate to LUB for a multi-catch's argument
Summary: [1.7][navigate] "Open declared type" does not navigate to LUB for a multi-cat...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7.1   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 340059
Blocks:
  Show dependency tree
 
Reported: 2011-03-31 09:57 EDT by Ayushman Jain CLA
Modified: 2011-08-02 05:45 EDT (History)
2 users (show)

See Also:


Attachments
Fix 2 (catch up with bug 228376) (18.80 KB, patch)
2011-04-11 11:09 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.