| Summary: | [preferences][content assist] Autocomplete in editor | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | trebor86 |
| Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | trivial | ||
| Priority: | P3 | CC: | daniel_megert, pwebster |
| Version: | 3.7.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
This can be configured on the 'Content Assist' preference page. Do you mean 'Insert single proposals automatically' option? That doesn't solve the problem I've described. It's a great option but it works bad. It breaks the method name when hitting 'ctrl+space' combination on an already written method name when there is only one proposal. Instead it should act as I described before. See the example in my description. (In reply to comment #2) > Do you mean 'Insert single proposals automatically' option? Yes. > That doesn't solve > the problem I've described. It's a great option but it works bad. It breaks the > method name when hitting 'ctrl+space' combination on an already written method > name when there is only one proposal. No, it shouldn't if the option is disabled. If that's not the case for you, then please provide a full step by step example. There is one caveat: content assist always uses the left side of the selection to trigger the completion i.e. if you select "one", then it will trigger it as if the caret would be before 'o'. It's not about disabling 'Insert single proposals automatically' 'cause it's very usefull. Here's what I mean:
Lengend:
<cs> - ctrl + space hit
<cp> - carret possition
>> - result of an action
Available methods:
ob.methodOne();
ob.methodTwo();
ob.methodThree();
Example 1. Usefull side of the option [while writting method name]
ob.methodO<cs> >> ob.methodOne()<cp>
Example 2. [method name already written]
ob.methodTwo(); //now we want to check if there are any other methods starting at 'methodT' so ...
ob.methodT<cs>wo(); //we click at this position and as a result we get a window with all the method names starting at 'methodT'
BUT
Example 3.[method name already written]
ob.methodO<cs>ne(); //we now check if there are any methods starting at 'methodO'
ob.methodO<cs>ne(); >> ob.methodOne()<cp>ne(); //which isn't neccecarily what we wanted to achieve (we only wanted to check the names of other methods)
HOW imo it should look like?:
Example 3.1
ob.methodO<cs>ne(); //should show a window with a method description (the same as in Example 2, but only methodOne() listed)
Hope it describes what I mean. Regards
OK, I see what you mean. It's something in the middle of the current option. I think this is overkill. Note that if you choose that completion overwrites, you won't end up with garbage. |
There's an annoying thing about autocompleting method names in eclipse editor. Lets say we have methods like: someobject.methodOne(); someobject.methodTwo(); someobject.methodTwenty(); When we hit ctrl+space somewhere at the 'method' word we will be given a list of available method names (all three methods). BUT if we hit the same key combination on word 'One' it will autocomplete the method name (cause there is only one method starting lets say on 'methodO'). What does it mean? If we want to check list of available method names starting on 'methodO' and are unlucky to have only one result it will autocomplete the name even if its already shown (e.g. we will get 'someobject.methodOnene();' - which is VERY annoying). It should ALWAYS list available method names (starting at a certain carret point) and do not autocomplete if the method name is the only result and is already shown (alternatively it could move carret to a place where we pass vars). So ... the result should be as follows: someobject.methodO<ctrl+space>ne(); >> someobject.methodOne(<carret_position>); -- Configuration Details -- Product: Eclipse 1.4.1.20110909-0613 (org.eclipse.epp.package.java.product) Installed Features: org.eclipse.platform 3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK