Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-06-2007, 01:21 AM
Member
 
Join Date: Aug 2007
Posts: 23
mwildam is on a distinguished road
Netbeans 6.0 - code completion of method parameters
I just updated to NetBeans 6.0 and I find the code completion of method parameters very annoying and counter productive.

It inserts the parameters as keywords when choosing a method from the list after pressing CTRL+SPACE.

How can I switch this off?

I searched the options and also the forum but didn't find a solution.

Sample - to understand what I mean:
Code:
public static String formatDate(Date myDate, String myFormat)
When typing
Code:
Str.form<CTRL+SPACE,choose method, ENTER>
it looks like
Code:
Str.formatDate(myDate, errorMessage)
I know that myDate is selected by default afterwards and pressing space or whatever replaces the selected parameter. For a method with a single parameter is not a big problem but if a method has more parameters it is annoying, because although myDate is selected and I can overwrite it, I have to proceed to the next parameter with CTRL+M instead of simply typing a comma. This is very annoying if a method has more parameters and as this annoyance occurs approx. every 5 lines that accumulates.

So I am searching for the appropriate option to switch that "feature" completely off. As this "feature" wasn't there in 5.5.1 I hope for the ability to switch off that.
__________________
Greetings, Martin Wildam.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-06-2007, 01:56 AM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
I am using a development build, so my options might be different. But what about unchecking "Insert Single Proposals Automatically" in Editor tab of the options window reached by Tools->Options?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-06-2007, 02:00 AM
Member
 
Join Date: Aug 2007
Posts: 23
mwildam is on a distinguished road
No, does not work - tried that already.

How does it behave at your site? - Does it insert the parameters automatically?

I wonder if this is maybe errorous behaviour - maybe because I imported the settings from NetBeans 5.5.1.
__________________
Greetings, Martin Wildam.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 12-06-2007, 02:56 AM
Member
 
Join Date: Aug 2007
Posts: 23
mwildam is on a distinguished road
I just found out (also re-reading some NetBeans documentation) that the "errorMessage" in my test case was an attempt of NetBeans to guess the correct parameter to pass. "errorMessage" was a variable I used above but this was actually a bad guess.

Too much guessing is not good. If I move the cursor to somewhere else before finishing a code line might be left with some bad "default" from the guess of NetBeans and as the line has been autocompleted I might forget easily that this line should have been completed.
__________________
Greetings, Martin Wildam.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 12-06-2007, 03:00 AM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
I had found autocomplete feature annoying before sometimes too. After your message i checked the options and as far as i see, unchecking that checkbox is working for me. I tried to call an existing method by writing the name of it and press Ctrl + Space, it just did not fill it automatically and shoed the options instead. But i might be wrong because i did not observe the behavior of this autocomplete closely/carefully.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 12-06-2007, 03:12 AM
Member
 
Join Date: Aug 2007
Posts: 23
mwildam is on a distinguished road
No, it does not work - even if I restart the IDE. Maybe you have some other option set or you didn't understand me well, what I mean.

It does also autocomplete the closing bracket. I am searching where to disable this but didn't succeed so far.
__________________
Greetings, Martin Wildam.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 12-06-2007, 03:15 AM
Member
 
Join Date: Aug 2007
Posts: 23
mwildam is on a distinguished road
The "Insert closing brackets" option does only work as expected if not using the code completion with CTRL+SPACE.
__________________
Greetings, Martin Wildam.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 12-06-2007, 11:58 AM
Member
 
Join Date: Aug 2007
Posts: 23
mwildam is on a distinguished road
I learned in the meantime that ENTER and TAB also jumps to the next parameter which is much easier than using CTRL+M (as mentioned in the NetBeans documentation). TAB is even better to use because when you navigate to another portion of the code for example to find the correct variable to use in the parameter TAB brings you back to the editing line and next parameter (as long as you didn't edit code somewhere else in the meantime).
And SHIFT-TAB works also to bring you back to the previous parameter.
__________________
Greetings, Martin Wildam.
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 12-18-2007, 06:50 AM
Member
 
Join Date: Dec 2007
Posts: 1
Cruxic is on a distinguished road
Make it stop!
Like mwildam I also dislike the parameter guessing feature of Netbeans 6. I have yet to see it guess correctly - which means it creates more work because I have to first erase it's guesses. "Insert Single Proposals Automatically" does not control this feature as far as I can tell. Please let us know if anybody figures out how to turn this off. (cruxic ignoreatignore gmail.com)
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 12-18-2007, 10:02 AM
Member
 
Join Date: Aug 2007
Posts: 23
mwildam is on a distinguished road
I worked now a few days with that feature and nevertheless even through the jumping with TAB feature I do not like that feature.

I begin to think that either all automatic quote and braces generation does reduce productivity rather than improving it. It often ends up in more code needs to be deleted than written.

For example when copy and pasting code portions usually there remain more braces than necessary.
__________________
Greetings, Martin Wildam.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
auto completion window does not pop-up erdaffi NetBeans 0 12-11-2007 01:48 PM
Method parameters bounded by a Class JavaForums Java Blogs 0 11-21-2007 02:31 PM
is synchronization on method passing local variables as parameters needed reddzer Java Servlet 0 11-10-2007 05:47 PM
get parameters in jsp cecily JavaServer Pages (JSP) and JSTL 1 08-05-2007 05:29 AM
Generating Code Automatically Using Custom code Template In Eclipse JavaForums Eclipse 1 04-26-2007 04:52 PM


All times are GMT +3. The time now is 10:34 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org