Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] calling to super.match in performMatch of CPairMatcher

Hi,
In CPairMatcher we have a method which is called performMatch and throws a BadLocation exception. There's a wrapper method match which encapsulates performMatch and catches this exception. The same situation exists in the father class of CPairMatcher. Nevertheless performMatch uses super.match which eats the exception, so that BadLocationException thrown in the father class wouldn't be noticed. This seems wrong - it seems like super.performMatch should be used. Am I correct? can anyone change that?

Except, I would like to add a method to the pair matching interface that would match any character without using the document.charAt() method to determine which character is there in the current offset.
[it's equivalent to setting the character in the given offset to, say, '}', then activate the usual match function, lastly change the character back]. This requires changing eclipse infrastructure (jface.eclipse.CharacterPairMatcher). Is that a good idea? How can I do that?

Back to the top