Bug 75407

Summary: [templates] Additions to template variables for Java editor
Product: [Eclipse Project] Platform Reporter: Eugene Kuleshov <ekuleshov>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: l.bolzani
Version: 3.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Eugene Kuleshov CLA 2004-09-30 14:59:36 EDT
Quite often I want to select some text in Java and make it parameter of the
method. So I wrote the following template.

  ${cursor}${method}(${word_selection}

It works ok, but I'd like to see a completion drop-down popup for the available
method names in the current class. So, I sugest to add some more variables to
the templates for Java editor:

-- offer method names from the current class
-- offer field names from the current class (should respect "this" setting)
-- offer type names

Probably it could be done in more generic way and authomatically open
context-sensitive code completion.
Comment 1 Tom Hofmann CLA 2006-08-14 11:49:32 EDT
The enhancement request is of course still valid, but please note that it is now possible to contribute your own variable resolvers to the Java editor template mechanism.
Comment 2 Dani Megert CLA 2007-11-06 04:50:36 EST
Variable resolvers for field, local vars and vars has been added (3.3).
Comment 3 Dani Megert CLA 2008-05-19 05:08:52 EDT
*** Bug 232654 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Webmaster CLA 2019-09-06 15:29:45 EDT
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.