Examples of IStructuredDocumentRegionList


Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList

  }

  private void internalSetNewDocument(IStructuredDocument structuredDocument) {
    if (structuredDocument == null)
      return;
    IStructuredDocumentRegionList flatNodes = structuredDocument.getRegionList();
    if ((flatNodes == null) || (flatNodes.getLength() == 0)) {
      return;
    }
    if (this.document == null)
      return; // being constructed
    XMLModelUpdater updater = getActiveUpdater();
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList

   *
   */
  public void nodesReplaced(StructuredDocumentRegionsReplacedEvent event) {
    if (event == null)
      return;
    IStructuredDocumentRegionList oldStructuredDocumentRegions = event.getOldStructuredDocumentRegions();
    IStructuredDocumentRegionList newStructuredDocumentRegions = event.getNewStructuredDocumentRegions();
    XMLModelUpdater updater = getActiveUpdater();
    if (updater != null) { // being updated
      try {
        updater.replaceStructuredDocumentRegions(newStructuredDocumentRegions, oldStructuredDocumentRegions);
      }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList

    IStructuredDocument structuredDocument = model.getStructuredDocument();
    if (structuredDocument == null)
      return;

    String value = null;
    IStructuredDocumentRegionList flatNodes = structuredDocument.getRegionList();
    if (flatNodes != null) {
      int count = flatNodes.getLength();
      if (count > 0) {
        StringBuffer buffer = new StringBuffer();
        for (int i = 0; i < count; i++) {
          IStructuredDocumentRegion flatNode = flatNodes.item(i);
          if (flatNode == null)
            continue;
          buffer.append(flatNode.getText());
        }
        value = buffer.toString();
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList

      }
      if (_trace) {
        time1 = System.currentTimeMillis();
      }
      IRegion damage;
      IStructuredDocumentRegionList newDocumentRegions = structuredDocumentEvent.getNewStructuredDocumentRegions();
      if (newDocumentRegions.getLength() > 0) {
        int startOffset = newDocumentRegions.item(0).getStartOffset();
        int length = newDocumentRegions.item(newDocumentRegions.getLength() - 1).getEndOffset() - startOffset;
        damage = new Region(startOffset, length);

      }
      else {
        damage = new Region(structuredDocumentEvent.fOffset, structuredDocumentEvent.getLength());
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList

    IDOMNode content = (IDOMNode) child;
    int oldLength = content.getEndOffset() - content.getStartOffset();

    // get new content length
    int newLength = 0;
    IStructuredDocumentRegionList flatNodes = structuredDocument.getRegionList();
    if (flatNodes != null) {
      int count = flatNodes.getLength();
      if (count > 0) {
        IStructuredDocumentRegion last = flatNodes.item(count - 1);
        if (last != null)
          newLength = last.getEnd();
      }
    }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList

    if (event.getOriginalRequester() == getRequesterH2C())
      return;
    IStructuredDocument structuredDocument = event.getStructuredDocument();
    if (structuredDocument == null)
      return;
    IStructuredDocumentRegionList flatNodes = structuredDocument.getRegionList();
    if (flatNodes == null)
      return;

    replaceStructuredDocumentRegions(flatNodes, null);
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList

  public void nodesReplaced(StructuredDocumentRegionsReplacedEvent event) {
    if (event == null)
      return;
    if (event.getOriginalRequester() == getRequesterH2C())
      return;
    IStructuredDocumentRegionList oldStructuredDocumentRegions = event.getOldStructuredDocumentRegions();
    IStructuredDocumentRegionList newStructuredDocumentRegions = event.getNewStructuredDocumentRegions();
    if (oldStructuredDocumentRegions == null && newStructuredDocumentRegions == null)
      return;

    replaceStructuredDocumentRegions(newStructuredDocumentRegions, oldStructuredDocumentRegions);
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList

      return;
    if (Debug.debugStructuredDocument) {
      System.out.println("maybe redraw stuff"); //$NON-NLS-1$
    }
    // just the new stuff
    IStructuredDocumentRegionList newStructuredDocumentRegions = structuredDocumentEvent.getNewStructuredDocumentRegions();

    int nNewNodes = newStructuredDocumentRegions.getLength();
    if (nNewNodes > 0) {
      IStructuredDocumentRegion firstNode = newStructuredDocumentRegions.item(0);
      IStructuredDocumentRegion lastNode = newStructuredDocumentRegions.item(nNewNodes - 1);
      redrawRange(firstNode.getStartOffset(), lastNode.getEndOffset());
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList

    IStructuredDocument structuredDocument = model.getStructuredDocument();
    if (structuredDocument == null)
      return;

    String value = null;
    IStructuredDocumentRegionList flatNodes = structuredDocument.getRegionList();
    if (flatNodes != null) {
      int count = flatNodes.getLength();
      if (count > 0) {
        StringBuffer buffer = new StringBuffer();
        for (int i = 0; i < count; i++) {
          IStructuredDocumentRegion flatNode = flatNodes.item(i);
          if (flatNode == null)
            continue;
          buffer.append(flatNode.getText());
        }
        value = buffer.toString();
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.