public int getElementCount() { return Utilities.getRowCount(BaseDocument.this); }
public void run () { try { int end = (endPos > 0 && Utilities.getRowStart(doc, endPos) == endPos) ? endPos-1 : endPos; int lineCnt = Utilities.getRowCount(doc, startPos, end); List mimeTypes = new ArrayList(lineCnt); int pos = startPos; for (int x = lineCnt ; x > 0; x--) { mimeTypes.add(getRealMimeType(ts, pos)); pos = Utilities.getRowStart(doc, pos, 1); } pos = startPos; for (Iterator iter = mimeTypes.iterator(); iter.hasNext(); ) { modifyLine(doc, (String)iter.next(), pos); pos = Utilities.getRowStart(doc, pos, 1); } } catch (BadLocationException e) { target.getToolkit().beep(); } } });
public void run () { try { int end = (endPos > 0 && Utilities.getRowStart(doc, endPos) == endPos) ? endPos - 1 : endPos; int lineCnt = Utilities.getRowCount(doc, startPos, end); List mimeTypes = new ArrayList(lineCnt); int pos = startPos; for (int x = lineCnt ; x > 0; x--) { mimeTypes.add(getRealMimeType(ts, pos)); pos = Utilities.getRowStart(doc, pos, 1); } pos = startPos; for (Iterator iter = mimeTypes.iterator(); iter.hasNext(); ) { modifyLine(doc, (String)iter.next(), pos); pos = Utilities.getRowStart(doc, pos, 1); } } catch (BadLocationException e) { target.getToolkit().beep(); } } });
if (importsRange[0] != null && Utilities.getRowCount(doc, importsRange[0].getStart(), importsRange[0].getEnd()) > 1) { folds.put("imports", Collections.singletonList(importsRange[0])); // NOI18N
endPos--; int lineCnt = Utilities.getRowCount(doc, startPos, endPos); List mimeTypes = new ArrayList(lineCnt); int pos = startPos;
return getElement(Utilities.getRowCount(BaseDocument.this) - 1); // last
for (int lineCnt = Utilities.getRowCount(doc, startPos, endPos); lineCnt > 0; lineCnt-- ) {
for (int lineCnt = Utilities.getRowCount(doc, startPos, endPos); lineCnt > 0; lineCnt--) { int indent = Utilities.getRowIndent(doc, pos); if (Utilities.isRowWhite(doc, pos)) {
for (int lineCnt = Utilities.getRowCount(doc, startPos, endPos); lineCnt > 0; lineCnt--) { if (Utilities.getRowEnd(doc, pos) - pos >= 2 && doc.getText(pos, 2).equals(lineCommentString)) { doc.remove(pos, 2);
for (int lineCnt = Utilities.getRowCount(doc, startPos, endPos); lineCnt > 0; lineCnt-- ) {
for (int lineCnt = Utilities.getRowCount(doc, startPos, endPos); lineCnt > 0; lineCnt--) {
public @Override void run() { try { Caret caret = target.getCaret(); int startPos; int endPos; if (caret.isSelectionVisible()) { startPos = Utilities.getRowStart(doc, target.getSelectionStart()); endPos = target.getSelectionEnd(); if (endPos > 0 && Utilities.getRowStart(doc, endPos) == endPos && endPos > startPos) { endPos--; } endPos = Utilities.getRowEnd(doc, endPos); } else { // selection not visible startPos = Utilities.getRowStart(doc, caret.getDot()); endPos = Utilities.getRowEnd(doc, caret.getDot()); } int lineCount = Utilities.getRowCount(doc, startPos, endPos); boolean comment = forceComment != null ? forceComment : !allComments(doc, startPos, lineCount); if (comment) { comment(doc, startPos, lineCount); } else { uncomment(doc, startPos, lineCount); } } catch (BadLocationException e) { target.getToolkit().beep(); } } });
for (int lineCnt = Utilities.getRowCount(doc, startPos, endPos); lineCnt > 0; lineCnt-- ) {
int lines = Utilities.getRowCount((BaseDocument) document); int lastLineEndOffset; if (endLine + 1 < lines) {
int lineCnt = Utilities.getRowCount(doc, startPos, endPos); endPos = Utilities.getRowStart(doc, startPos, +lineCnt); } else {