Bug 49552 - [content assist] Code Assist doesn't always complete on symbols
Summary: [content assist] Code Assist doesn't always complete on symbols
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 139239 (view as bug list)
Depends on: 110181
Blocks:
  Show dependency tree
 
Reported: 2004-01-05 17:42 EST by snowl CLA
Modified: 2007-06-22 10:01 EDT (History)
1 user (show)

See Also:


Attachments
Complete on symbols R3_1 (5.00 KB, patch)
2005-09-12 16:41 EDT, snowl CLA
no flags Details | Diff
Complete on symbols (inc casts) R3_1 (5.09 KB, patch)
2005-09-13 15:59 EDT, snowl CLA
no flags Details | Diff
symbol triggers (6.04 KB, patch)
2005-09-16 17:26 EDT, snowl CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description snowl CLA 2004-01-05 17:42:53 EST
As requested in bug 35068 I am raising this as an enhancement.

Pressing an appropriate symbol doesn't always complete the current code-assist 
selection. eg

  int offset, length = 10;
  int i = offset + le<ctrl_space>+

Pressing + should complete "length".

eg2

int[] array = new int[le<ctrl_space>]

Pressing ] should complete "length"

Affected symbols + - / * < > & | ? : ^ % ) } ] ! 

A fix is attached to bug 35068.
Comment 1 Leopold Welsch CLA 2004-01-07 04:19:19 EST
Probably I'm out of the loop, nevertheless two issues:

1)  int i = offset + le<ctrl_space><space>

Pressing <space> should complete "length" => Does this work? As far as I know,
the SPACE did NOT have any effect up till now.

2)  int i = offset + leng<ctrl_space>

Pressing <ctrl_space> should complete "length" without any FURTHER requests from
the user. i.e. when no further possibilities from the list possible
AUTO-Complete should be done.

If both don't fit exactly into this Bug then I'm willing to open another bug.
But then somebody should give me more info if this is required.

ALSO, frankly said: Don't know if in the current built both issues were already
fixed or not.
Comment 2 snowl CLA 2005-09-12 16:41:59 EDT
Created attachment 27049 [details]
Complete on symbols R3_1

This is an update to the patch attached to bug 35068 against R3_1. It fixes
this bug and bug 39667.
Comment 3 Dani Megert CLA 2005-09-13 09:32:13 EDT
I agree that e.g. operators make sense when entering an expressionbut but since
we currently have no means to get the context (e.g. whether we're entering an
expression) we don't want to add more triggers which are used in all cases.
Comment 4 snowl CLA 2005-09-13 15:59:34 EDT
Created attachment 27078 [details]
Complete on symbols (inc casts) R3_1

We can generalize this to 2 situations:

A) In a situation where the user has chosen to press an invalid symbol (eg
"extends Clonea<ctrl-space>+")
  1) We could trigger and produce invalid Java or,
  2) We could not trigger and produce invalid Java.
  
  And you want to choose 2, because the symbol is invalid.
  
B) In a situation where the user has chosen to press a valid symbol (eg "a =
new int[leng<ctrl-space>])
  1) We could trigger and produce valid Java or,
  2) We could not trigger and produce invalid Java.
  
  And you want to choose 2 to behave the same as A.

You appear to be trying to fix the behaviour when the cat jumps on the keyboard
 at the expense of breaking it when the user is trying to write valid Java. The
cat doesn't care whether we trigger or not, it just wants to be stroked :-)
Comment 5 snowl CLA 2005-09-16 17:26:11 EDT
Created attachment 27232 [details]
symbol triggers
Comment 6 Dani Megert CLA 2006-05-02 10:16:31 EDT
*** Bug 139239 has been marked as a duplicate of this bug. ***
Comment 7 Leopold Welsch CLA 2006-08-30 08:08:26 EDT
Is there any chance to have a fix in the next release? Since in 3.2 this is still an issue.
Comment 8 Dani Megert CLA 2007-06-22 09:59:18 EDT
Get rid of deprecated state.