Package org.eclipse.wst.sse.ui.internal.reconcile.validator

Examples of org.eclipse.wst.sse.ui.internal.reconcile.validator.AnnotationInfo


                processor.setAdditionalFixInfo(objArray);
              }
             
            }
            message.setAttribute(QUICKASSISTPROCESSOR, processor);
            AnnotationInfo info = new AnnotationInfo(message);
            ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
          }
          else  {
            String selectionStrategy = (String) message.getAttribute(SQUIGGLE_SELECTION_STRATEGY_ATTRIBUTE);
            String nameOrValue = (String) message.getAttribute(SQUIGGLE_NAME_OR_VALUE_ATTRIBUTE);
View Full Code Here


    if (reporter instanceof IncrementalReporter) {
      MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
      processor.setProblemId(problemId);
      processor.setAdditionalFixInfo(attributeValueText);
      message.setAttribute(QUICKASSISTPROCESSOR, processor);
      AnnotationInfo info = new AnnotationInfo(message);
      ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
    }
    else {
      reporter.addMessage(this, message);
    }
View Full Code Here

      if (reporter instanceof IncrementalReporter) {
        MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
        processor.setProblemId(ProblemIDsXML.AttrsInEndTag);
        message.setAttribute(QUICKASSISTPROCESSOR, processor);

        AnnotationInfo info = new AnnotationInfo(message);
        ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
      }
      else {
        reporter.addMessage(this, message);
      }
View Full Code Here

      if (reporter instanceof IncrementalReporter) {
        MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
        processor.setProblemId(ProblemIDsXML.MissingClosingBracket);
        message.setAttribute(QUICKASSISTPROCESSOR, processor);

        AnnotationInfo info = new AnnotationInfo(message);
        ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
      }
      else {
        reporter.addMessage(this, message);
      }
View Full Code Here

        if (reporter instanceof IncrementalReporter) {
          MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
          processor.setProblemId(ProblemIDsXML.EmptyTag);
          message.setAttribute(QUICKASSISTPROCESSOR, processor);

          AnnotationInfo info = new AnnotationInfo(message);
          ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
        }
        else {
          reporter.addMessage(this, message);
        }
View Full Code Here

              MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
              processor.setProblemId(ProblemIDsXML.MissingAttrValue);
              processor.setAdditionalFixInfo(additionalFixInfo);
              message.setAttribute(QUICKASSISTPROCESSOR, processor);

              AnnotationInfo info = new AnnotationInfo(message);
              ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
            }
            else {
              reporter.addMessage(this, message);
            }
            errorCount++;
          }
        }
        // name but no '=' (XML only)
        else if ((attrState == 1) && (i >= 1)) {
          // create annotation
          ITextRegion previousRegion = textRegions.get(i - 1);
          if (!(previousRegion instanceof ITextRegionContainer)) {
            Object[] args = {structuredDocumentRegion.getText(previousRegion)};
            String messageText = NLS.bind(XMLUIMessages.Attribute__has_no_value, args);
            int start = structuredDocumentRegion.getStartOffset(previousRegion);
            int textLength = structuredDocumentRegion.getText(previousRegion).trim().length();
            int lineNo = getLineNumber(start);

            LocalizedMessage message = new LocalizedMessage(SEVERITY_ATTRIBUTE_HAS_NO_VALUE, messageText);
            message.setOffset(start);
            message.setLength(textLength);
            message.setLineNo(lineNo);

            if (reporter instanceof IncrementalReporter) {
              MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
              processor.setProblemId(ProblemIDsXML.NoAttrValue);
              processor.setAdditionalFixInfo(structuredDocumentRegion.getText(previousRegion));
              message.setAttribute(QUICKASSISTPROCESSOR, processor);

              AnnotationInfo info = new AnnotationInfo(message);
              ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
            }
            else {
              reporter.addMessage(this, message);
            }
View Full Code Here

          if (reporter instanceof IncrementalReporter) {
            MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
            processor.setProblemId(ProblemIDsXML.SpacesBeforeTagName);
            message.setAttribute(QUICKASSISTPROCESSOR, processor);

            AnnotationInfo info = new AnnotationInfo(message);
            ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
          }
          else {
            reporter.addMessage(this, message);
          }
View Full Code Here

          if (reporter instanceof IncrementalReporter) {
            MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
            processor.setProblemId(ProblemIDsXML.NamespaceInPI);
            message.setAttribute(QUICKASSISTPROCESSOR, processor);

            AnnotationInfo info = new AnnotationInfo(message);
            ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
          }
          else {
            reporter.addMessage(this, message);
          }
View Full Code Here

              MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
              processor.setProblemId(ProblemIDsXML.MissingEndTag);
              processor.setAdditionalFixInfo(additionalFixInfo);
              message.setAttribute(QUICKASSISTPROCESSOR, processor);

              AnnotationInfo info = new AnnotationInfo(message);

              ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
            }
            else {
              reporter.addMessage(this, message);
            }
          }
        }
      }
      else {
        IStructuredDocumentRegion startRegion = xmlNode.getStartStructuredDocumentRegion();
        if (startRegion == null || startRegion.isDeleted()) {
          // analyze the tag (check self closing)
          ITextRegionList regions = endRegion.getRegions();
          ITextRegion r = null;
          int start = sdRegion.getStart();
          int length = sdRegion.getTextLength();
          for (int i = 0; i < regions.size(); i++) {
            r = regions.get(i);
            if (r.getType() == DOMRegionContext.XML_TAG_NAME) {
              tagName = sdRegion.getText(r);
              start = sdRegion.getStartOffset(r);
              length = r.getTextLength();
            }
          }

          if (tagName != null) {
            Object[] args = {tagName};
            String messageText = NLS.bind(XMLUIMessages.Missing_start_tag_, args);

            int lineNumber = getLineNumber(start);

            IMessage message = new LocalizedMessage(SEVERITY_MISSING_START_TAG, messageText);
            message.setOffset(start);
            message.setLength(length);
            message.setLineNo(lineNumber);

            if (reporter instanceof IncrementalReporter) {
              Object[] additionalFixInfo = getStartEndFixInfo(xmlNode, tagName, r);

              MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
              processor.setProblemId(ProblemIDsXML.MissingStartTag);
              processor.setAdditionalFixInfo(additionalFixInfo);
              message.setAttribute(QUICKASSISTPROCESSOR, processor);

              AnnotationInfo info = new AnnotationInfo(message);

              ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
            }
            else {
              reporter.addMessage(this, message);
View Full Code Here

        if (reporter instanceof IncrementalReporter) {
          MarkupQuickAssistProcessor processor = new MarkupQuickAssistProcessor();
          processor.setProblemId(ProblemIDsXML.SpacesBeforePI);
          message.setAttribute(QUICKASSISTPROCESSOR, processor);
 
          AnnotationInfo info = new AnnotationInfo(message);
          ((IncrementalReporter) reporter).addAnnotationInfo(this, info);
        }
        else {
          reporter.addMessage(this, message);
        }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.sse.ui.internal.reconcile.validator.AnnotationInfo

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.