David van Dugteren
David van Dugteren

Reputation: 4119

Curly Braces not working in Eclipse

See the image, basically if I go to enter shift+[ or shift+] aka { or } in eclipse

I expect the editor to update the .java source with a { or }.

Instead it seems to be indenting...

Now I'm using a standard macbook pro, with English any ideas why eclipse won't let me enter the curly brace. It worked about 2 weeks ago, did an update... using Mountain Lion... now it's not working. enter image description here Any ideas?

Upvotes: 4

Views: 10948

Answers (4)

GeorgGG1976
GeorgGG1976

Reputation: 31

enter image description here

Just delete the keys, simple. Hope it helps.

General->Keys->Type filter keys->skip  ->skip All Brakepoint->Bindings-> Delete

Upvotes: 3

robi-vtc
robi-vtc

Reputation: 41

My solution was:

Help -> Key Assist then find skip Skip all Breakpoints.

Select it and press ctrl + shift + L. It will open a preferences window and then just delete binding.(ctrl + alt + b)

I hope it solved your problem!

Upvotes: 4

Andriy Boyko
Andriy Boyko

Reputation: 601

I had this problem in Eclipse Java EE for Web Developers Luna 4.4.1. Both of "Braces" options were selected. But it started to work properly only after selecting "Enter key adjust the indentation on the new line". Hope it will help someone.

Upvotes: 1

Ashutosh Jindal
Ashutosh Jindal

Reputation: 18867

This behavior is controlled by the following preference.

Go to Preferences -> Java -> Editor -> Typing and confirm that the Automatically close -> Braces option is selected like so :

enter image description here

For what it's worth, I have never had the problem you have been experiencing on Mountain Lion OSX and for the past few days I have been switching between Eclipse Indigo, Helios and Juno.

If the above does not work, try switching to a new workspace and try there ? I am not aware of any other preference which might be controlling this brace-closing behavior.

Question : Which version of Eclipse are you on ?

Upvotes: 2

Related Questions