public int[] findMatches() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { ((AbstractDocument) context.getDocument()).readUnlock();
public int[] findOrigin() throws BadLocationException, InterruptedException { ((AbstractDocument) context.getDocument()).readLock(); try { int [] origin = BracesMatcherSupport.findChar( context.getDocument(), context.getSearchOffset(), context.getLimitOffset(), backward = origin[2] < 0; TokenHierarchy<Document> th = TokenHierarchy.get(context.getDocument()); sequences = th.embeddedTokenSequences(originOffset, backward); if (!sequences.isEmpty()) { ((AbstractDocument) context.getDocument()).readUnlock();
@Override public int[] findOrigin() throws BadLocationException, InterruptedException { ((AbstractDocument) context.getDocument()).readLock(); try { int [] origin = BracesMatcherSupport.findChar( context.getDocument(), context.getSearchOffset(), context.getLimitOffset(), backward = origin[2] < 0; TokenHierarchy<Document> th = TokenHierarchy.get(context.getDocument()); sequences = th.embeddedTokenSequences(originOffset, backward); if (!sequences.isEmpty()) { ((AbstractDocument) context.getDocument()).readUnlock();
public int [] findMatches() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { BaseDocument doc = (BaseDocument) context.getDocument(); int offset = context.getSearchOffset(); char[] origin = doc.getChars(offset, 1); if (isRhtmlStartTag(doc, offset, origin)) { int limit = doc.getText().length(); int matching = matchChar(doc, offset, limit, '>'); while (matching != -1 && doc.getChars(matching - 1, 1)[0] == '=') { matching = matchChar(doc, matching + 1, limit, '>'); } return new int[] {matching, matching + 1}; } else if (isRhtmlEndTag(doc, offset, origin)) { int limit = 0; int matching = matchChar(doc, offset, limit, '<'); if (matching != -1) { return new int[] {matching, matching + 1}; } } } finally { ((AbstractDocument) context.getDocument()).readUnlock(); } return delegate.findMatches(); }
public int[] findOrigin() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { Language language = null; TokenHierarchy<Document> th = TokenHierarchy.get(context.getDocument()); seqEnd = context.getDocument().getLength(); ((AbstractDocument) context.getDocument()).readUnlock();
@Override public int[] findMatches() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { TokenSequence<?> seq = getTokenSequence(); if (seq.moveNext() && SPECIAL_TOKENS.contains(seq.token().id())) { int offset = BracesMatcherSupport.matchChar( context.getDocument(), backward ? originOffset : originOffset + 1, backward ? seq.offset() : seq.offset() + seq.token().length(), ((AbstractDocument) context.getDocument()).readUnlock();
public int [] findOrigin() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { BaseDocument doc = (BaseDocument) context.getDocument(); ((AbstractDocument) context.getDocument()).readUnlock();
public int [] findMatches() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { BaseDocument doc = (BaseDocument) context.getDocument(); ((AbstractDocument) context.getDocument()).readUnlock();
public int [] findMatches() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { BaseDocument doc = (BaseDocument) context.getDocument(); int offset = context.getSearchOffset(); ((AbstractDocument) context.getDocument()).readUnlock();
@Override public int [] findOrigin() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { BaseDocument doc = (BaseDocument) context.getDocument(); int offset = context.getSearchOffset(); ((AbstractDocument) context.getDocument()).readUnlock();
public int[] findMatches() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { TokenSequence<?> seq = getTokenSequence(); if (seq.token().id() == FortranTokenId.STRING_LITERAL) { int offset = BracesMatcherSupport.matchChar( context.getDocument(), backward ? originOffset : originOffset + 1, backward ? seq.offset() : seq.offset() + seq.token().length(), ((AbstractDocument) context.getDocument()).readUnlock();
@Override public int [] findMatches() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { BaseDocument doc = (BaseDocument) context.getDocument(); int offset = context.getSearchOffset(); ((AbstractDocument) context.getDocument()).readUnlock();
public int [] findOrigin() throws InterruptedException, BadLocationException { ((AbstractDocument) context.getDocument()).readLock(); try { BaseDocument doc = (BaseDocument) context.getDocument(); int offset = context.getSearchOffset(); TokenSequence<?extends RubyTokenId> ts = LexUtilities.getRubyTokenSequence(doc, offset); ((AbstractDocument) context.getDocument()).readUnlock();