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

Bug 149779

Summary: [assist] Content Assist gives wrong proposals
Product: [Eclipse Project] JDT Reporter: Wallace Xu <xu_wallace>
Component: CoreAssignee: David Audel <david_audel>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Wallace Xu CLA 2006-07-06 00:02:44 EDT
In the following test code, when I let caret stop at "e" in "nameLabel.setText(e)" and call content assist, it gives me wrong proposal, "else" and "elseif" block, NOT "event". But it seems correct when I comment the last statement.

My JDK is 1.5.0_07-b03, eclipse verison is 3.2.0 M20060629-1905

public class Test{
    
    private Label nameLabel = null;
    private Tree typeTree = null;
    private TreeViewer treeViewer = null;
    
    public Test() {
        initialize();
    }

    private void initialize() {
        
        typeTree.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent event) {
                nameLabel.setText(e);
            }
        });
        
        typeTree.addListener(SWT.MenuDetect, new Listener() {
            public void handleEvent(Event event) {
                
            }
        });
        
        treeViewer = new TreeViewer(typeTree);
        treeViewer.setCellEditors(new CellEditor[] {new TextCellEditor(typeTree)});
    }
}
Comment 1 Frederic Fusier CLA 2006-07-06 05:46:37 EDT
Reproduced using JDT/Core v_703
Comment 2 Tom Hofmann CLA 2006-07-07 09:16:22 EDT
related to bug 141256?
Comment 3 Eclipse Genie CLA 2019-09-05 14:55:24 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.