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

Bug 363786

Summary: The Content Assit does not sure to appear in different area
Product: [Eclipse Project] JDT Reporter: lemo <le7mo27>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: RESOLVED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: amj87.iitr
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description lemo CLA 2011-11-15 04:19:24 EST
Build Identifier: 20110301-1815

private Handler myHandler = new Handler() {

		@Override
		public void handleMessage(Message msg) {
			switch(msg.what) {
			case xxoo:
				if (msg.obj == null) showToast("网络错误!", false);
				else {
					int returnValue = Integer.valueOf((String) msg.obj);
					if (returnValue == 1) {
						if (graphies != null) {
							desc.setText(graphies.desc);
							
							LoadImageCommon loadImage = new LoadImageCommon();
							loadImage.loadImage(graphies.bpic, new ImageCallback() {
								
								@Override
								public void imageLoaded(Bitmap bitmap) {
									if (bitmap != null) {
										iView.setImageBitmap(bitmap);
									} else {
										
									}
								}
							});
						desc.setText(graphies.desc);
						}
					} else {
						showToast("获取图片信息失败!", false);
					}
				}
				break;
			}
			
		}
		
	};

This is part of my android codes!The bug which is my reported is that you can see the first variable named desc ,the Content Assist is worked! And the second position used desc ,the Content Assist is not worked,but it can through the compile and the program is worked!

Reproducible: Sometimes

Steps to Reproduce:
1.need a abstract class 
2.a class include a method which is one of its parmers needs to use the abstract classes
3.a test class ,a global variable used to test the function! And the test class maybe an inner class,I don't know !It just occasionally happen!
Comment 1 Ayushman Jain CLA 2011-11-15 12:15:47 EST
I managed to distill this down to the following snippet


package snippet;

class Desc {
	void foo(){
		
	}
	public void loadImage(Object object) {
		// TODO Auto-generated method stub	
	}
}
public class Snippet {
	private Object myHandler = new Object() {
	        public void handleMessage(String msg) {
	        	Desc desc = new Desc();
	            switch(msg.charAt(1)) {
	            case 1:
	                    int returnValue = Integer.valueOf( msg);
	                            desc.foo();
	                            Desc desc2 = new Desc();
	                            desc2.loadImage(new	Object() {
	                                public void imageLoaded() {
	                                }
	                            });
	                            desc.<CTRL-SPC>
	                break;
	            }
	        }
	 };
}

This makes it a duplicate of bug 318192

*** This bug has been marked as a duplicate of bug 318192 ***