Bug 43212 - catch variable not recognized by code-completion
Summary: catch variable not recognized by code-completion
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-17 08:48 EDT by Jean-Michel Lemieux CLA
Modified: 2003-12-16 10:57 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 Jean-Michel Lemieux CLA 2003-09-17 08:48:10 EDT
3.0 I20030916

The following code does not work with code-completion. The exception 'e' doesn't
seem to be resolved so that when I type 'e.' + ctrl+space there are no
suggestions given. However, if I type a method name I know exists and save the
file compiles without errors. Here is the snippet of code that causes problems:

public class AnonymousClassTest {
	private Job fetchLogEntriesJob = new
Job(Policy.bind("HistoryView.fetchHistoryJob")) { //$NON-NLS-1$
			private ICVSFile remoteFile;
			public void setRemoteFile(ICVSFile file) {
				this.remoteFile = file;
			}
			public IStatus run(IProgressMonitor monitor) {
					try {
						remoteFile.getLogEntries(monitor);
					} catch (TeamException e) {
	====> this line doesn't resolve ===> return e.;
					}
					return Status.OK_STATUS;
			}
		};
}
Comment 1 David Audel CLA 2003-11-27 11:46:57 EST
Simpler test case:
public class X {
	Object o = new Object() {
		void foo() {
			try {
			} catch(Exception e) {
				e.
			}
		}
	};
}
Comment 2 David Audel CLA 2003-12-04 11:17:32 EST
Fixed and test added
DietRecoveryTest#test109
DietRecoveryTest#test110
CompletionParserTest2#test0135
CompletionParserTest2#test0134
Comment 3 Frederic Fusier CLA 2003-12-16 10:57:08 EST
Verified with build I200312160010