Bug 30600 - incorrect code assist after 'throw new'
Summary: incorrect code assist after 'throw new'
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-30 08:11 EST by Adam Kiezun CLA
Modified: 2003-02-04 07:07 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 Adam Kiezun CLA 2003-01-30 08:11:52 EST
20030128
class Test{
	void foo(){
		throw new <<CODE ASSIST HERE
	}
}

inserts Test right away.
2 problems:

a.Test is not a subclass of Throwable, so it makes no sense
b.more than 1 proposal should be presented

--
side note:
it's incorrect after any 'new', I think - it always just puts in the name of 
the enclosing class
Comment 1 David Audel CLA 2003-02-04 06:53:32 EST
Current behavior :
- if there is at least a character then all types are proposed. Otherwise only 
enclosings types and top level types of the current unit are proposed (avoid to 
suggest all types of the workspace).
- in a 'throw' statement all possible types are proposed, but relevance of 
exceptions is higher. Currently a proposed type is considered as an exception 
if his name contains 'exception' or 'error' (compute hierarchy is too costly).

So, all seems to work as design ;)

Adam - Any comment ? If there is no comment, i close this bug.
Comment 2 Adam Kiezun CLA 2003-02-04 06:56:35 EST
ok to close then
Comment 3 David Audel CLA 2003-02-04 07:07:57 EST
closing.