Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » JavaPairMatcher discouraged -- bracket matching how to?
JavaPairMatcher discouraged -- bracket matching how to? [message #288784] Mon, 25 July 2005 03:16 Go to next message
Eclipse UserFriend
Hi,

I'm implementing bracket matching for Eclipse plugin. All the examples
I've looked at are using something like this:

painter = new MatchingCharacterPainter(
sourceViewer,
new JavaPairMatcher(MATCHING_BRACKETS_PAIR)
);


However, Eclipse keeps underlining this JavaPairMatcher in yellow saying
that its use is discouraged (because it's an internal JDT API class afaik).

So, what's the right-thing-to-do here? What's the easiest way to
implement bracket matching without getting any yellow underlines? I
noticed that CDT copied the entire JavaPairMatcher class into it's own
source code which I thought was very ugly, this internal class also
depends only other internals classes etc.

Surely, it must be possible to implement bracket matching without
getting yellow line warnings AND not copy-paste coding?


Regards,
martin
Re: JavaPairMatcher discouraged -- bracket matching how to? [message #288792 is a reply to message #288784] Mon, 25 July 2005 05:31 Go to previous message
Eclipse UserFriend
There is no public implementation of ICharacterMatcher since determining
whether a bracket is the peer of another is usually language dependent
(just imaging commented out brackets, string literals etc).

A simple implementation should be trivial to come up with, though.

-tom

Martin Olsson wrote:
> Hi,
>
> I'm implementing bracket matching for Eclipse plugin. All the examples
> I've looked at are using something like this:
>
> painter = new MatchingCharacterPainter(
> sourceViewer,
> new JavaPairMatcher(MATCHING_BRACKETS_PAIR)
> );
>
>
> However, Eclipse keeps underlining this JavaPairMatcher in yellow saying
> that its use is discouraged (because it's an internal JDT API class afaik).
>
> So, what's the right-thing-to-do here? What's the easiest way to
> implement bracket matching without getting any yellow underlines? I
> noticed that CDT copied the entire JavaPairMatcher class into it's own
> source code which I thought was very ugly, this internal class also
> depends only other internals classes etc.
>
> Surely, it must be possible to implement bracket matching without
> getting yellow line warnings AND not copy-paste coding?
>
>
> Regards,
> martin
Previous Topic:Setting the current line
Next Topic:Ant in Eclipse
Goto Forum:
  


Current Time: Sun May 11 10:04:29 EDT 2025

Powered by FUDForum. Page generated in 0.02481 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top