Package org.eclipse.wst.xml.core.internal.provisional.document

Examples of org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement


    return newNode;
  }

  protected IDOMNode insertStartTag(IDOMNode node) {
    IDOMElement element = (IDOMElement) node;
    if (element.isCommentTag())
      return node; // do nothing

    IDOMNode newNode = null;

    String tagName = node.getNodeName();
View Full Code Here


    return result;
  }

  protected IDOMNode quoteAttrValue(IDOMNode node) {
    IDOMElement element = (IDOMElement) node;
    if (element.isCommentTag())
      return node; // do nothing

    boolean quoteAttrValues = getCleanupPreferences().getQuoteAttrValues();
    IDOMNode newNode = node;
View Full Code Here

  }

  private void processDirective(IReporter reporter, IFile file, IStructuredModel model, IStructuredDocumentRegion documentRegion) {
    IndexedRegion ir = model.getIndexedRegion(documentRegion.getStartOffset());
    if (ir instanceof IDOMElement) {
      IDOMElement element = (IDOMElement) ir;
      ModelQuery query = ModelQueryUtil.getModelQuery(model);
      if (query != null) {
        CMElementDeclaration cmElement = query.getCMElementDeclaration(element);
        if (cmElement != null) {
          CMNamedNodeMap cmAttributes = null;
View Full Code Here

        return false;
    }

    Node parent = text.getParentNode();
    if (parent != null && parent.getNodeType() == Node.ELEMENT_NODE) {
      IDOMElement element = (IDOMElement) parent;
      if (!element.isGlobalTag() && !text.isElementContentWhitespace())
        return false;
    }

    return canFormatChild(parent);
  }
View Full Code Here

    return result;
  }

  private IDOMNode insertEndTag(IDOMNode node) {
    IDOMNode newNode = node;
    IDOMElement element = (IDOMElement) node;
    if (element.isCommentTag())
      return node; // do nothing

    int startTagStartOffset = node.getStartOffset();
    IDOMModel structuredModel = node.getModel();
View Full Code Here

   * @return
   */
  private boolean isCommentTag(Node renamedNode) {
    boolean result = false;
    if (renamedNode instanceof IDOMElement) {
      IDOMElement element = (IDOMElement) renamedNode;
      result = element.isCommentTag();
    }
    return result;
  }
View Full Code Here

  private boolean isXMLTag(IDOMElement element) {
    return element.isXMLTag();
  }

  protected void applyAttrNameCase(IDOMNode node) {
    IDOMElement element = (IDOMElement) node;
    if (element.isCommentTag())
      return; // do nothing

    int attrNameCase = HTMLCorePreferenceNames.ASIS;
    if (!shouldPreserveCase(element)) {
      if (isXMLTag(element))
View Full Code Here

      return false;
    return true;
  }

  protected IDOMNode applyTagNameCase(IDOMNode node) {
    IDOMElement element = (IDOMElement) node;
    if (element.isCommentTag())
      return node; // do nothing

    int tagNameCase = HTMLCorePreferenceNames.ASIS;

    if (!shouldPreserveCase(element)) {
View Full Code Here

  /**
   */
  protected void cleanupCSSAttrValue(IDOMNode node) {
    if (node == null || node.getNodeType() != Node.ELEMENT_NODE)
      return;
    IDOMElement element = (IDOMElement) node;
    if (!element.isGlobalTag())
      return;

    Attr attr = element.getAttributeNode("style"); //$NON-NLS-1$
    if (attr == null)
      return;
    String value = getCSSValue(attr);
    if (value == null)
      return;
View Full Code Here

    return (decl.getContentType() == CMElementDeclaration.EMPTY);
  }

  protected IDOMNode insertEndTag(IDOMNode node) {
    IDOMElement element = (IDOMElement) node;

    int startTagStartOffset = node.getStartOffset();
    IDOMModel structuredModel = node.getModel();
    IDOMNode newNode = null;

    if (element.isCommentTag()) {
      // do nothing
    }
    else if (isEmptyElement(element)) {
      IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
      IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement

Copyright © 2018 www.massapicom. 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.