Community
Participate
Working Groups
Build Identifier: 20100617-1415 within active code templates, one can modify variable names and they will change in all template locations, a bit like in refactoring. In addition, code completion is available (not in refactoring). Code completion for methods inserts code correctly UNLESS you type some prefix letters first before choosing a completion. Reproducible: Always Steps to Reproduce: This is a bug that occurs when using code completion in a code template. It can always be reproduced, but the template needs to remain active (blue frames around variables). If you leave the eclipse window and deactivate the template, the bug does not occur. to reproduce, write this method: public static void test(Object obj) { i } the cursor shout be after the "i". From now on, do not switch focus from the eclipse window, and press only keys as suggested below. Press Ctrl-Space, select instanceof template. Code now looks like this: if (obj instanceof type) { type new_name = (type) obj; } press arrow right to unselect 'obj'. Press '.' -> popup opens offering the methods on java.lang.Object. type 'not' -> popup offers notify() and notifyAll() with arrow keys and return, select no notifyAll. Result, code looks like this: if (obj.notifyAll()nstanceof type) { type new_name = (type) obj.notifyAll(); } should look like this if (obj.notifyAll() instanceof type) { type new_name = (type) obj.notifyAll(); } the more you type into code completion before selecting ('notify' instead of 'not') the more gets overwritten. The same happens also for other templates, not just the instanceof template.
To reproduce one has to select Java > Editor > Content Assist | Completion overwrites
*** Bug 464922 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.