Summary: | When using the "Alt + /" smart code prompt to select a method, Eclipse inserts the current method body behavior by default, which will lead to the following situation, which is very frustrating: | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | xh z <395053994> | ||||
Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||
Status: | NEW --- | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | stephan.herrmann | ||||
Version: | 4.16 | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Windows 10 | ||||||
Whiteboard: | stalebug | ||||||
Attachments: |
|
This problem cannot be solved by Preferences-> Java-> Editor-> Content-Assist. Although the method can be replaced, the method body can not be replaced with the selected method body, you still need to manually delete the useless parameter content I believe I understand what you are saying, but let me double check: (In reply to xh z from comment #0) > When using the "Alt + /" smart code prompt to select a method, On my box "Alt+/" does nothing, may I assume you mean normal code completion? (by default on Ctrl+space). > Eclipse inserts the current method body behavior by default, you probably don't mean "body", right? As far as I can see this is about call arguments (incl. the surrounding pair of parantheses), right? > which will lead to the > following situation, which is very frustrating: > Please see the picture for the process description: (A word document just to show us three pictures is really not the most accessible format ...) > Can you see it? The previous method body still needs to be manually deleted, > which is very troublesome in coding. I agree this is annoying. > I don't know if this problem can be solved. If it can't be solved, please > transfer it to the Eclipse IDE development team to solve it. What do you > think? We *are* Eclipse IDE developers, no need to transfer... :) Actually, the requested functionality basically exists: see the preference Java > Editor > Content assist > Insertion > (o) Completion overwrites Try it, it will likely make you happy. I can confirm, however, that this feature is not perfect: * it is not the default so many people will not know about it * my preferred mode is to keep it at (o) Completion inserts and use Ctrl to toggle when I mean "overwrite" BUT this option is not available when Ctrl+space already inserts, because only one proposal matches, so there's no chance to hit Ctrl+Enter :( I seem to recall this has already been discussed in some previous bug. Anybody remembers? *** Bug 562258 has been marked as a duplicate of this bug. *** 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. 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. |
Created attachment 282444 [details] Please refer to the document for detailed operation When using the "Alt + /" smart code prompt to select a method, Eclipse inserts the current method body behavior by default, which will lead to the following situation, which is very frustrating: Please see the picture for the process description: Can you see it? The previous method body still needs to be manually deleted, which is very troublesome in coding. I don't know if this problem can be solved. If it can't be solved, please transfer it to the Eclipse IDE development team to solve it. What do you think? Other IDEs replace the current method body by default, which is great. Can you understand what I mean by my description? Like, IntelliJ IDEA, VisualStudio do not need to manually delete useless parameter content like this You can use the selected method to replace the current method body content including method parameters and other information Please refer to the document for detailed operation System: win10 enterprise x64 STS4: 4.6 x64 Memory: 8GB Hard disk: 5400 rpm JDK: 1.8 I hope you or the Eclipse IDE team can solve this problem. thank you very much!