Bug 9151 - [preferences] Bracket matching and related selections should be configurable via preference
Summary: [preferences] Bracket matching and related selections should be configurable ...
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 5359 6085 6145 6764 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-02-06 06:23 EST by Kai-Uwe Maetzel CLA
Modified: 2011-12-12 08:30 EST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai-Uwe Maetzel CLA 2002-02-06 06:23:29 EST
Several reports about unexpected bracket matching, block selection, etc. when 
close or between neighboring brackets. There should be a preference page that 
allows users to specify the precedence between different brackets "([{" and 
which bracket wins in case of neighboring similar brackets.
Comment 1 Kai-Uwe Maetzel CLA 2002-02-06 06:25:31 EST
*** Bug 5359 has been marked as a duplicate of this bug. ***
Comment 2 Kai-Uwe Maetzel CLA 2002-02-06 06:27:05 EST
*** Bug 6085 has been marked as a duplicate of this bug. ***
Comment 3 Kai-Uwe Maetzel CLA 2002-02-06 06:28:01 EST
*** Bug 6145 has been marked as a duplicate of this bug. ***
Comment 4 Kai-Uwe Maetzel CLA 2002-02-06 06:28:56 EST
*** Bug 6764 has been marked as a duplicate of this bug. ***
Comment 5 Johan Walles CLA 2002-02-06 06:46:29 EST
What is this bug about?  The description talks about bracket matching, but the
title about double clicking.

Assuming this bug is indeed about bracket matching and not double clicking,
here's a copy of my comment to bug 5359:

Emacs solves this problem by matching the bracket that your cursor is to the
right of.  So in the following example (with | denoting the cursor)...

({[]}|)

... the curly braces will get highlighted.  This is a solution that I find works
well (without having to specify any precedence).
Comment 6 Johan Compagner CLA 2002-02-08 14:20:21 EST
a curly braket is { yes?

but what does it do with this: (|{[]})

then it should select {[]}

i can't really understand what the problem really is also because it should 
select where it is in. so the nearest opening on the right or the nearest 
closing on the left.


Comment 7 Dani Megert CLA 2008-04-14 06:22:39 EDT
*** Bug 9503 has been marked as a duplicate of this bug. ***
Comment 8 Dani Megert CLA 2011-05-16 09:29:24 EDT
*** Bug 121013 has been marked as a duplicate of this bug. ***
Comment 9 Dani Megert CLA 2011-05-16 09:29:33 EDT
*** Bug 345918 has been marked as a duplicate of this bug. ***
Comment 10 Martin Oberhuber CLA 2011-07-21 16:33:13 EDT
CQ:WIND00276139 

I'm not sure why my bug 345918 got duplicated to this one ... since this one talks about picking what brackets to match, whereas my requests were about improving the visibility of the bracket highlighter (and keep match identification as today).

I've put a description of expected behavior on bug 345918 - the nice little free tool "Notepad++" shows how this ought to be done in an intuitive way. Here's my minimal expectation:

* When any single bracket is _selected_, it's clear what's supposed to be the
  matching bracket. It should be highlighted. (Today we only highlight based on
  caret position).

* The bracket highlighting should be better visible - eg allow choosing a color
  for the highlighted bracket

* Highlight both opening and closing bracket, to make clear what's the pair.
  This is important when caret becomes invisible due to competing highlighters,
  eg CDT symbol highlighter.
Comment 11 Dani Megert CLA 2011-07-22 01:50:02 EDT
> I'm not sure why my bug 345918 got duplicated to this one ... since this one
> talks about picking what brackets to match
You ask for just another preference/way of doing/showing the brackets. This bug here covers that.
Comment 12 Dani Megert CLA 2011-12-12 08:30:06 EST
We don't plan to do this but instead fix bug 9503.