org.netbeans.editor.Utilities.isRowEmpty()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(141)

本文整理了Java中org.netbeans.editor.Utilities.isRowEmpty()方法的一些代码示例,展示了Utilities.isRowEmpty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.isRowEmpty()方法的具体详情如下:
包路径:org.netbeans.editor.Utilities
类名称:Utilities
方法名:isRowEmpty

Utilities.isRowEmpty介绍

[英]Tests whether the line contains no characters except the ending new-line.
[中]测试该行是否除结束新行外不包含任何字符。

代码示例

代码示例来源:origin: net.java.abeille/abeille

public static int getFirstNonEmptyRow(BaseDocument doc, int offset, boolean downDir) throws BadLocationException {
  while (offset != -1 && isRowEmpty(doc, offset)) {
    offset = getRowStart(doc, offset, downDir ? +1 : -1);
  }
  return offset;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib

public static int getFirstNonEmptyRow(BaseDocument doc, int offset, boolean downDir)
throws BadLocationException {
  while (offset != -1 && isRowEmpty(doc, offset)) {
    offset = getRowStart(doc, offset, downDir ? +1 : -1);
  }
  return offset;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-editor

if (actualPrevIndent != prevIndent) {
  if (!(Utilities.isRowEmpty(doc, prevOffset) || Utilities.isRowWhite(doc, prevOffset))) {
    indent = actualPrevIndent + (indent - prevIndent);
    if (indent < 0) {

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby

selectionEnd = temp;
boolean startLineIsEmpty = Utilities.isRowEmpty(doc, selectionBegin);
boolean endLineIsEmpty = Utilities.isRowEmpty(doc, selectionEnd);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby

if (actualPrevIndent != prevIndent) {
  if (!(Utilities.isRowEmpty(doc, prevOffset) || Utilities.isRowWhite(doc, prevOffset))) {
    indent = actualPrevIndent + (indent-prevIndent);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby

if (!Utilities.isRowEmpty(baseDoc, offset) &&
    !Utilities.isRowWhite(baseDoc, offset)) {
  break;
if (Utilities.isRowEmpty(baseDoc, offset) || Utilities.isRowWhite(baseDoc, offset)) {
    if (!Utilities.isRowEmpty(baseDoc, offset) &&
        !Utilities.isRowWhite(baseDoc, offset)) {
      break;

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby

while (offset >= 0) {
  if (Utilities.isRowEmpty(doc, offset) || Utilities.isRowWhite(doc, offset)) {
    if (currentSectionOnly) {
      break;
while (offset < length) {
  if (Utilities.isRowEmpty(doc, offset) || Utilities.isRowWhite(doc, offset)) {
    if (currentSectionOnly) {
      break;

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-editor

int currentOffset = offset;
while (currentOffset > 0) {
  if (!Utilities.isRowEmpty(doc, currentOffset) && !Utilities.isRowWhite(doc, currentOffset)
      && !LexUtilities.isCommentOnlyLine(doc, currentOffset)) {
    indent = GsfUtilities.getLineIndent(doc, currentOffset);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf

try {
  if (Utilities.isRowEmpty(doc, from)) {
    return;

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-rhtml

private void comment(BaseDocument doc, int startOffset, int lineCount) throws BadLocationException {
  for (int offset = startOffset; lineCount > 0; lineCount--, offset = Utilities.getRowStart(doc, offset, +1)) {
    if (Utilities.isRowEmpty(doc, offset) || Utilities.isRowWhite(doc, offset)) {
      continue;

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-rhtml

private void uncomment(BaseDocument doc, int startOffset, int lineCount) throws BadLocationException {
  for (int offset = startOffset; lineCount > 0; lineCount--, offset = Utilities.getRowStart(doc, offset, +1)) {
    if (Utilities.isRowEmpty(doc, offset) || Utilities.isRowWhite(doc, offset)) {
      continue;

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby

if (Utilities.isRowEmpty(doc, next) || Utilities.isRowWhite(doc, next) ||
    LexUtilities.isCommentOnlyLine(doc, next)) {
  continue;

相关文章