This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 247147 - Code template is not called when tab pressed in method parameters filling
Summary: Code template is not called when tab pressed in method parameters filling
Status: RESOLVED DUPLICATE of bug 242789
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P1 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-16 06:32 UTC by honza.hubeny
Modified: 2014-09-16 14:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description honza.hubeny 2014-09-16 06:32:48 UTC
Let's have defined following code template:

sc  ->   String.class${cursor}

Further, let's have following class:

public class DataSet {

..........

public <E extends Object> E getColumnValue(String columnName, Class<E> clazz) {

        return (E) activeRow.get(columnName);
    }
..........
}

Now when we use this class in editor and type

String columnName = "TEST";
DataSet ds = new DataSet();
ds.getColumnValue  
     <<NOW press Ctrl+Space and we get>>
ds.getColumnValue(columnName,null)   <<literal columnName is now in the red square, we press tab key>>

ds.getColumnValue(columnName,null) <<now literal null is in red square>>
<< we now type sc and the tab key>>

And here come the bug:
till netbeans 7.x the behaviour was following:

the sc code template was used and you get
ds.getColumnValue(columnName, String.class)

now in netbeans 8.x after typing sc and tab key the red square jumps back to previous literal columnName and you are unable to use any code template until you press several times Esc key and jump out from "red square method parameter round robin".

Following behaviuor was observed on Ubuntu 12.04, Ubuntu 14.04 MacOS X10.
Comment 1 Jiri Prox 2014-09-16 14:24:43 UTC

*** This bug has been marked as a duplicate of bug 242789 ***