Examples of removePosition()


Examples of org.eclipse.jface.text.IDocument.removePosition()

      // operate directly on the widget
      st.replaceTextRange(widgetInsertionOffset, 0, st.getLineDelimiter());

      // restore caret unless an auto-indenter has already moved the caret
      // then leave it alone
      document.removePosition(caret);
      if (updateCaret && st.getSelection().x == widgetInsertionOffset) {
        int widgetCaret= AbstractTextEditor.modelOffset2WidgetOffset(sv, caret.getOffset());
        if (widgetCaret != -1)
          st.setSelectionRange(widgetCaret, 0);
        st.showSelection();
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.removePosition()

          // a) find the next non-deleted Position from the old list
          while (position == null && i < n) {
            position= (Position) oldPositions.get(i++);
            if (position.isDeleted() || contain(removedPositionsList, position)) {
              document.removePosition(positionCategory, position);
              position= null;
            }
          }

          // b) find the next Position from the added list
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.removePosition()

                    while ((position == null) && (i < n)) {
                        position = oldPositions.get(i++);

                        if (position.isDeleted()
                                || _contain(removedPositionsList, position)) {
                            document.removePosition(positionCategory, position);
                            position = null;
                        }
                    }

                    if ((addedPosition == null) && (j < m)) {
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.removePosition()

              (p.overlapsWith(start, length) &&
                 (!d.containsPosition(fPositionCategory, start, length) ||
                  !contentType.equals(p.getType())))) {

            rememberRegion(p.offset, p.length);
            d.removePosition(fPositionCategory, p);
            ++ first;

          } else
            break;
        }
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.removePosition()

      category= d.getPositions(fPositionCategory);

      TypedPosition p;
      while (first < category.length) {
        p= (TypedPosition) category[first++];
        d.removePosition(fPositionCategory, p);
        rememberRegion(p.offset, p.length);
      }

    } catch (BadPositionCategoryException x) {
      // should never happen on connected documents
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.removePosition()

      final IDocument document= getDocument();
      final Position position= (Position) fSelections.pop();

      try {
        document.removePosition(fSelectionCategory, position);
        Point currentSelection= getSelectedRange();
        if (currentSelection == null || currentSelection.x != position.getOffset() || currentSelection.y != position.getLength())
          setSelectedRange(position.getOffset(), position.getLength());

        if (fSelections.isEmpty())
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.removePosition()

              (p.overlapsWith(start, length) &&
                 (!d.containsPosition(fPositionCategory, start, length) ||
                  !contentType.equals(p.getType())))) {

            rememberRegion(p.offset, p.length);
            d.removePosition(fPositionCategory, p);
            ++ first;

          } else
            break;
        }
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.removePosition()

      first= d.computeIndexInCategory(fPositionCategory, lastScannedPosition);

      TypedPosition p;
      while (first < category.length) {
        p= (TypedPosition) category[first++];
        d.removePosition(fPositionCategory, p);
        rememberRegion(p.offset, p.length);
      }

    } catch (BadPositionCategoryException x) {
      // should never happen on connected documents
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.removePosition()

      final IDocument document= getDocument();
      final Position position= (Position) fSelections.pop();

      try {
        document.removePosition(fSelectionCategory, position);
        Point currentSelection= getSelectedRange();
        if (currentSelection == null || currentSelection.x != position.getOffset() || currentSelection.y != position.getLength()) {
          if (position instanceof ColumnPosition && getTextWidget().getBlockSelection()) {
            setSelection(new BlockTextSelection(document, document.getLineOfOffset(position.getOffset()), ((ColumnPosition) position).fStartColumn, document.getLineOfOffset(position.getOffset() + position.getLength()), ((ColumnPosition) position).fEndColumn, getTextWidget().getTabs()));
          } else {
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.removePosition()

      final IDocument document= getDocument();
      final Position position= (Position) fSelections.pop();

      try {
        document.removePosition(fSelectionCategory, position);
        Point currentSelection= getSelectedRange();
        if (currentSelection == null || currentSelection.x != position.getOffset() || currentSelection.y != position.getLength()) {
          if (position instanceof ColumnPosition && getTextWidget().getBlockSelection()) {
            setSelection(new BlockTextSelection(document, document.getLineOfOffset(position.getOffset()), ((ColumnPosition) position).fStartColumn, document.getLineOfOffset(position.getOffset() + position.getLength()), ((ColumnPosition) position).fEndColumn, getTextWidget().getTabs()));
          } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.