Community
Participate
Working Groups
I20050526-1700 Not sure if this is JUI or JCORE. Content suggest does not work when there is a compilation error on the following line. For example, in the method below, a semi-colon is missing in "Map map = new HashMap()", which causes the suggestion to "assign to local" to *not* appear for the preceeding line "new Vector();". public void testCapacityOne() { String foo = "123fhasjkfhda"; new Vector(); // CONTENT ASSIST HERE Map map = new HashMap() int size= fFullest.size(); for (int i= 0; i < 100; i++) { fFullest.addElement(new Integer(i)); map.put(new Integer(i), Integer.toHexString(i)); } assertTrue(fFullest.size() == 100+size); }
"assign to local" is a Quick Fix. Move to JDT/UI
Darin, you are talking about quick assist not content assist. Right ?
I don't know the name for it :-) It's the suggestion to "assign to local" for an expression that has not been assigned to a variable.
The missing semicolon prevents the creation of any AST statements in the block. Without any AST we can't suuggest quick fixes. The AST should be more fault tolerant here. Moving to jdt.core
*** This bug has been marked as a duplicate of 42253 ***
Reopen. This bug is not a duplicate of bug 42253 but depends on it... I'm still not able to get correct quick-fix even with robust AST enabled...
Move to JDT/UI for comment. There should be nothing preventing JDT/UI to propose the quick-fix as I can see all statements in ASTView.
I get the 'Assign statement to local' proposal' set the cursor on before 'new' or select the whole statement'. Frederic? Tested with I20060216-0010
It's OK, I was looking for a quick-fix on Map map =... line... Sorry for the confusion