Bug 518199 - No Content Assist Proposals for specific code pattern
Summary: No Content Assist Proposals for specific code pattern
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.6   Edit
Hardware: PC CentOS
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-13 12:21 EDT by Mark Leone CLA
Modified: 2022-09-28 17:01 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Leone CLA 2017-06-13 12:21:29 EDT
Content assist does not work in certain places of my code, where there are no error markers. Hover help is available in the places where content assist does not work. Through experimentation, I discovered a code pattern which demonstrates the problem. Of course, I don't know that this exhaustively describes the problem. But you can comment out the groups of lines indicated below and see that content assist starts working.

I have various Java proposal types enabled in the Java/Editor/Content Assist/Advanced preference node. Changing these did not seem to help. I'm using the latest Neon release (4.6.3).

public class Foo {
	
	Object obj = new Object() { //A

		public void foo() {

			
			if (true) { // B
				new Object()
				{ void foo() {}}//C
				;
			} //B
			
			/* 
			 * No content assist proposals work here unless you comment out lines marked
			 * as A, B, or C (or any combination of them)
			 */
			new Object(); 
		}
	}; //A

}
Comment 1 Jay Arthanareeswaran CLA 2017-06-13 12:34:16 EDT
Might be a case of not accounting for closing braces. Will take a look for 4.8.
Comment 2 Mark Leone CLA 2017-06-13 12:48:46 EDT
In support of the theory about closing braces, I can add extra closing braces to make content assist start working in the subsequent code lines. Of course, there are error markers then.
Comment 3 Manoj N Palat CLA 2017-08-03 05:39:48 EDT
moving out to M3
Comment 4 Jay Arthanareeswaran CLA 2017-10-16 08:30:05 EDT
Sorry, this has to be moved out again.
Comment 5 Manoj N Palat CLA 2018-05-21 06:13:53 EDT
Bulk move out of 4.8
Comment 6 Eclipse Genie CLA 2020-09-29 01:05:59 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.
Comment 7 Eclipse Genie CLA 2022-09-28 17:01:36 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.