Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 134648 - Create Method hint: Wrong position of method and cursor
Create Method hint: Wrong position of method and cursor
Status: NEW
Product: java
Classification: Unclassified
Component: Hints
All All
: P3 (vote)
: 6.x
Assigned To: Svata Dedic
Depends on:
  Show dependency treegraph
Reported: 2008-05-07 07:33 UTC by Jan Becicka
Modified: 2013-09-02 14:25 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2008-05-07 07:33:12 UTC

    public String getName() {
(o)     test();
        return NbBundle.getMessage(QuickSearchAction.class, "CTL_QuickSearchAction");

    protected String iconResource() {
        return "org/netbeans/modules/jumpto/resources/edit_parameters.png";

    public HelpCtx getHelpCtx() {
        return HelpCtx.DEFAULT_HELP;

    protected boolean asynchronous() {
        return false;

    public java.awt.Component getToolbarPresenter() {
        return retValue;

| <--cursor
    private void test() {
        throw new UnsupportedOperationException("Not yet implemented");

I would expect, that test() method should be generated right after getName(), not at the end of class. User will lose
context of editing. And method body should be preselected. Otherwise user is forced to go into method, delete body and
then start coding.
Comment 1 Max Sauer 2008-07-01 13:59:45 UTC
Method body preselection has been fixed as part of

Comment 2 Max Sauer 2008-07-08 09:17:40 UTC
The method position is not easy to correct and changes would be possibly inconsistent with other generation behaviour -- currently, we insert the method 
at the end of block of class members with same priority (GeneratorUtilities ClassMemberComparator).

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo