Results 1 to 9 of 9
  1. #1
    Neil_ is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Question How to disable closing parenthesis insertion when pressing "("?

    How can one disable in Eclipse automatic closing parenthesis ")" insertion when pressing opening parenthesis "(" to the right of a method name?

  2. #2
    Neil_ is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Default

    Found out how: Preferences->Java->Editor->Typing

  3. #3
    Neil_ is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Default

    The feature appears to be bugged however, because Eclipse just started inserting closing parentheses on me even with automatic insertion of closing parentheses turned off.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Not directly related to your question, but what's the purpose of disabling that feature? It's really helpful in my view, you never cannot miss any parenthesis at all when you are coding.

  5. #5
    Neil_ is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Default

    Because when a closing parenthesis is inserted it requires one to press right arrow to get over the closing parenthesis before pressing semicolon. Pressing right arrow then semicolon is a more difficult hand movement then pressing ) then semicolon.

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  7. #7
    HippoMan is offline Member
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    Hmmm, quite amazing thing. Actually those habits are differ from user to user. ;)
    ... which is why it's a good thing that Eclipse gave us an option to control this behavior.

    And it would be nice if that option actually worked. :)
    .

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    In NetBeans once you click the open brackets, then automatically it insert the closing one and place the cursor in between the brackets. I think it's a nice feature.

  9. #9
    boumbh is offline Member
    Join Date
    Dec 2012
    Posts
    3
    Rep Power
    0

    Default Re: How to disable closing parenthesis insertion when pressing "("?

    Quote Originally Posted by Eranga View Post
    In NetBeans once you click the open brackets, then automatically it insert the closing one and place the cursor in between the brackets. I think it's a nice feature.
    For all the years I’ve used Eclipse, I could never get used to that feature. When it’s on, I always start to forget a bunch of semicolons, sometimes I find some doubled double quotes on the beginning and/or the end of strings. Sometimes there are closing parenthesis that are randomly placed… If only Eclipse could report this kind of syntax errors within a decent amount of time…

    Sometimes you don’t need to close a parenthesis or a brace bracket right after the opening. For example when you want to put them around a block of existing code. So you need to do "Suppr" or worse – since "Suppr" is so far on the keyboard – close your bracket then delete. When – like me – you spend most of your time reviewing badly written code, this happens far more often than cleanly typing code, line after line from top left to bottom right.

    It’s like stupid Ms Word that uppercases the first letters of any text of every single table cells!

    Eclipse should have a new configuration section where "stupid typing" switches are centralized for all languages. I need to turn off those damn things every time I create a new Workspace, and then once for each language! If it was simpler to turn off (or better, off by default), or if it could remember that I am the same guy as on the other workspace, I wouldn’t be so annoyed.

    In my view, any feature that is counterintuitive should be off by default.
    Last edited by boumbh; 12-14-2012 at 01:37 PM.

Similar Threads

  1. Java, Military Format using "/" and "%" Operator!!
    By sk8rsam77 in forum New To Java
    Replies: 11
    Last Post: 02-26-2010, 03:03 AM
  2. Replies: 2
    Last Post: 01-24-2009, 06:56 PM
  3. Replies: 1
    Last Post: 10-20-2008, 07:35 AM
  4. "Jumble" or "Scramble" Program
    By Shadow22202 in forum Java Applets
    Replies: 8
    Last Post: 04-30-2008, 03:42 AM
  5. How to use "selectOneRadio" to enable/disable a Picklist
    By vivekbakshi in forum JavaServer Faces (JSF)
    Replies: 1
    Last Post: 04-07-2008, 03:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •