Package org.eclipse.wst.sse.core.internal.provisional.text

Examples of org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument.replaceText()


    // requester.
    // Otherwise, if requester is not identical,
    // the undo group gets "broken" into multiple pieces based
    // on the requesters being different. Technically, any unique, common
    // requester object would work.
    structuredDocument.replaceText(structuredDocument, startOffset + offset, length, source);
  }

  /**
   */
  protected void replaceSource(IDOMModel model, int offset, int length, String source) {
View Full Code Here


    // requester.
    // Otherwise, if requester is not identical,
    // the undo group gets "broken" into multiple pieces based
    // on the requesters being different. Technically, any unique, common
    // requester object would work.
    structuredDocument.replaceText(structuredDocument, offset, length, source);
  }

  /**
   */
  protected void setWidth(HTMLFormatContraints contraints, String source) {
View Full Code Here

            IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();

            int startTagStartOffset = newNode.getStartOffset();
            int offset = endTagStructuredDocumentRegion.getStart();
            int length = endTagStructuredDocumentRegion.getLength();
            structuredDocument.replaceText(structuredDocument, offset, length, ""); //$NON-NLS-1$
            newNode = (IDOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save

            offset = startTagStructuredDocumentRegion.getStart() + lastRegion.getStart();
            structuredDocument.replaceText(structuredDocument, offset, 0, "/"); //$NON-NLS-1$
            newNode = (IDOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
View Full Code Here

            int length = endTagStructuredDocumentRegion.getLength();
            structuredDocument.replaceText(structuredDocument, offset, length, ""); //$NON-NLS-1$
            newNode = (IDOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save

            offset = startTagStructuredDocumentRegion.getStart() + lastRegion.getStart();
            structuredDocument.replaceText(structuredDocument, offset, 0, "/"); //$NON-NLS-1$
            newNode = (IDOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
          }
        }
      }
    }
View Full Code Here

    if (structuredDocument == null)
      return;
    int offset = this.element.getStartEndOffset();
    int end = this.element.getEndStartOffset();
    int length = end - offset;
    structuredDocument.replaceText(model, offset, length, source);
  }
}
View Full Code Here

    if (structuredDocument.containsReadOnly(offset, length))
      return result;
    if (requester == null) {
      requester = structuredDocument;
    }
    return structuredDocument.replaceText(requester, offset, length, source);
  }

  protected Preferences getModelPreferences() {
    return HTMLCorePlugin.getDefault().getPluginPreferences();
  }
View Full Code Here

                // String(buffer, 0, nRead));
              }
            }
            // ignore read-only settings if reverting whole
            // document
            innerdocument.replaceText(this, 0, originalLengthToReplace, stringBuffer.toString(), true);
            model.setDirtyState(false);

          }
          catch (CoreException e) {
            Logger.logException(e);
View Full Code Here

          }
          else {
            stringBuffer.append(buffer, 0, nRead);
          }
        }
        innerdocument.replaceText(this, 0, originalLengthToReplace, stringBuffer.toString(), true);
      }
      catch (CoreException e) {
        Logger.logException(e);
      }
      catch (IOException e) {
View Full Code Here

        break;

    if (start == oldData.length() && start == data.length())
      return; // no change
    else if (start == oldData.length()) {
      structuredDocument.replaceText(getRequesterH2C(), start, 0, data.substring(start)); // append text to last
    }
    else if (start == data.length()) {
      structuredDocument.replaceText(getRequesterH2C(), start, oldData.length() - start, ""); // remove text of last //$NON-NLS-1$
    }
    else {
View Full Code Here

      return; // no change
    else if (start == oldData.length()) {
      structuredDocument.replaceText(getRequesterH2C(), start, 0, data.substring(start)); // append text to last
    }
    else if (start == data.length()) {
      structuredDocument.replaceText(getRequesterH2C(), start, oldData.length() - start, ""); // remove text of last //$NON-NLS-1$
    }
    else {
      // search differenct character position from last
      for (; start < oldData.length() - end && start < data.length() - end; end++) {
        if (oldData.charAt(oldData.length() - end - 1) != data.charAt(data.length() - end - 1))
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.