Examples of HighlightedPosition


Examples of at.ssw.coco.ide.features.semanticHighlighting.SemanticHighlightingManager.HighlightedPosition

    List<HighlightedPosition> oldPositions = fRemovedPositions;
    List<HighlightedPosition> newPositions = new ArrayList<HighlightedPosition>(
        fNOfRemovedPositions);
    for (int i = 0; i < oldPositions.size(); i++) {
      HighlightedPosition current = oldPositions.get(i);
      if (current != null) {
        newPositions.add(current);
      }
    }
    fRemovedPositions = newPositions;
View Full Code Here

Examples of at.ssw.coco.ide.features.semanticHighlighting.SemanticHighlightingManager.HighlightedPosition

    private SemanticToken fToken = new SemanticToken();

    private void addPosition(int offset, int length, HighlightingStyle style) {
      boolean isExisting = false;
      for (int i = 0; i < fRemovedPositions.size(); i++) {
        HighlightedPosition position = fRemovedPositions.get(i);
        if (position == null) {
          continue;
        }
        if (position.isEqual(offset, length, style)) {
          isExisting = true;
          fRemovedPositions.set(i, null);
          fNOfRemovedPositions--;
          break;
        }
      }

      if (!isExisting) {
        HighlightedPosition position = fJobPresenter
            .createHighlightedPosition(offset, length, style);
        fAddedPositions.add(position);
      }
    }
View Full Code Here

Examples of at.ssw.coco.ide.features.semanticHighlighting.SemanticHighlightingManager.HighlightedPosition

  private void applyPositions(TextPresentation textPresentation,
      int startIndex, int endIndex) {
    List<StyleRange> ranges = new ArrayList<StyleRange>(endIndex
        - startIndex);
    while (startIndex < endIndex) {
      HighlightedPosition position = (HighlightedPosition) fPositions
          .get(startIndex);
      if (!position.isDeleted()) {
        ranges.add(position.createStyleRange());
      }
      startIndex++;
    }
    StyleRange[] array = new StyleRange[ranges.size()];
    array = (StyleRange[]) ranges.toArray(array);
View Full Code Here

Examples of at.ssw.coco.ide.features.semanticHighlighting.SemanticHighlightingManager.HighlightedPosition

  /** applies the styleRange */
  private int applySinglePosition(TextPresentation textPresentation,
      int startIndex, int endIndex) {
    while (startIndex < endIndex) {
      HighlightedPosition position = (HighlightedPosition) fPositions
          .get(startIndex);
      if (!position.isDeleted()) {
        textPresentation.replaceStyleRange(position.createStyleRange());
      }
      startIndex++;
    }
    return startIndex;
  }
View Full Code Here

Examples of at.ssw.coco.ide.features.semanticHighlighting.SemanticHighlightingManager.HighlightedPosition

   *            the style
   * @return a new HighlightedPosition
   */
  public HighlightedPosition createHighlightedPosition(int offset,
      int length, HighlightingStyle highlightingStyle) {
    return new HighlightedPosition(offset, length, highlightingStyle,
        fPositionUpdater);
  }
View Full Code Here

Examples of at.ssw.coco.ide.features.semanticHighlighting.SemanticHighlightingManager.HighlightedPosition

   * @param highlightingStyle
   *            the style changed
   */
  public void highlightingStyleChanged(HighlightingStyle highlightingStyle) {
    for (int i = 0; i < fPositions.size(); i++) {
      HighlightedPosition position = (HighlightedPosition) fPositions
          .get(i);
      if (position.getStyle() == highlightingStyle) {
        fSourceViewer.invalidateTextPresentation(position.getOffset(),
            position.getLength());
      }
    }
  }
View Full Code Here

Examples of at.ssw.coco.ide.features.semanticHighlighting.SemanticHighlightingManager.HighlightedPosition

      try {

        Position[] positions = e.getDocument().getPositions(fCategory);

        for (int i = 0; i < positions.length; i++) {
          HighlightedPosition position = (HighlightedPosition) positions[i];

          int offset = position.getOffset();
          int end = offset + position.getLength();

          if (offset >= eventEnd) {
            updateWithPrecedingEvent(position, e);
          } else if (end <= eventOffset) {
            // skip
          } else {
            position.delete();
          }

        }

      } catch (BadPositionCategoryException exc) {
View Full Code Here

Examples of org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingManager.HighlightedPosition

   * @param highlighting The highlighting
   * @return The new highlighted position
   */
  public HighlightedPosition createHighlightedPosition(int offset, int length, HighlightingStyle highlighting) {
    // TODO: reuse deleted positions
    return new HighlightedPosition(offset, length, highlighting, fPositionUpdater);
  }
View Full Code Here

Examples of org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingManager.HighlightedPosition

   * @param highlighting The highlighting
   * @return The new highlighted position
   */
  public HighlightedPosition createHighlightedPosition(Position position, HighlightingStyle highlighting) {
    // TODO: reuse deleted positions
    return new HighlightedPosition(position, highlighting, fPositionUpdater);
  }
View Full Code Here

Examples of org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingManager.HighlightedPosition

   * @param isReadOnly Is this a read-only position
   * @return The new highlighted position
   */
  public HighlightedPosition createHighlightedPosition(Position position, HighlightingStyle highlighting, boolean isReadOnly) {
    // TODO: reuse deleted positions
    return new HighlightedPosition(position, highlighting, fPositionUpdater, isReadOnly);
  }
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.