Bug 3360

Summary: Code assist does not work in inner classes (1GJOVT6)
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: David Audel <david_audel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: All   
OS: Windows 2000   
Whiteboard:

Description David Audel CLA 2001-10-10 22:53:49 EDT
Code assist does not work when editing an inner class in a more complex case....

STEPS:
1. Import the NLS Plugin
2. Convert to PDE (in order to get the requisite libraries)
3. Open the class: ExternalizeWizardPage
4. go to the method: createTableViewer
5. try to use code assist when the cursor is on "super." shown on the last line of this snippet.
	private void createTableViewer(Composite composite){
		createTableComposite(composite);
		
		/*
		 * XXX
		 * Feature of CellEditors - double click is ignored.
		 * The workaround is to register my own listener and force the desired 
		 * behavior.
		 */
		fViewer= new TableViewer(fTable){
				protected void hookControl(Control control) {
					super.hookControl(control);

Note: anything after this point does not work either.

Note2: I have tried on a demo class but it does not reproduce this problem see the following:
------------------------cut here------------------------------------------------------------------------->
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Table;


public class Foo {

	public static void main(String[] args) {
		System.out.println("DebugTest1, eh");
	}

	public void foo(Table t) {
		Table fTable = t;
		TableViewer fViewer= new TableViewer(fTable) {
				protected void hookControl(Control control) {
					super.hookControl(control);

					((Table) control).addKeyListener(new KeyAdapter() {
						public void keyPressed(KeyEvent e) {
							if(e.
						}
					});
				}
		};
	}
}
------------------------cut here------------------------------------------------------------------------->

NOTES:

KH (9/10/2001 12:00:17 PM)
	Moving to JUI.
Comment 1 DJ Houghton CLA 2001-10-29 17:12:12 EST
PRODUCT VERSION:
Eclipse R0.9

Comment 2 Genady Beryozkin CLA 2001-12-08 07:43:20 EST
Even a simpler test case (based on stable 06Dec2001 build):

in the following example the code assist does not work 
inside the try block.

import java.io.IOException;

public class test1 {

    static Thread thr = new Thread() {
	public void run() {
	     System.out.println("test");
		try {
		    int c = System.in.read();
		    System.out.println(c);
		} catch (IOException e) {
		}
	}
    };
}

Comment 3 David Audel CLA 2001-12-14 10:18:01 EST
Fixed