Package org.objectstyle.wolips.bindings.wod

Examples of org.objectstyle.wolips.bindings.wod.HtmlElementCache


    IWodModel wodModel = _getModel();
    if (wodModel != null) {
      WodParserCache cache = getCache();
      IJavaProject javaProject = cache.getJavaProject();
      IType componentType = cache.getComponentType();
      HtmlElementCache htmlElementCache = cache.getHtmlEntry().getHtmlElementCache();
      List<WodProblem> wodProblems = wodModel.getProblems(javaProject, componentType, WodParserCache.getTypeCache(), htmlElementCache);
      IFile wodFile = getFile();
      if (wodFile != null && wodFile.exists()) {
        IFile htmlFile = cache.getHtmlEntry().getFile();
        boolean createHtmlMarkers = htmlFile != null && htmlFile.exists();
        for (WodProblem wodProblem : wodProblems) {
          WodModelUtils.createMarker(wodFile, wodProblem);

          String wodErrorsInHtmlSeverity = Activator.getDefault().getPluginPreferences().getString(PreferenceConstants.WOD_ERRORS_IN_HTML_SEVERITY_KEY);
          if (!PreferenceConstants.IGNORE.equals(wodErrorsInHtmlSeverity)) {
            // We create HTML markers for WOD problems so that you can have the
            // wod view closed and still see errors
            if (createHtmlMarkers && wodProblem instanceof IWodElementProblem) {
              IWodElement element = ((IWodElementProblem) wodProblem).getElement();
              if (element != null) {
                List<HtmlElementName> htmlElementNames = htmlElementCache.getHtmlElementNames(element.getElementName());
                if (htmlElementNames != null) {
                  for (HtmlElementName htmlElementName : htmlElementNames) {
                    int lineNumber = WodHtmlUtils.getLineAtOffset(cache.getHtmlEntry().getContents(), htmlElementName.getStartOffset());
                    WodElementProblem htmlProblem = new WodElementProblem(element, "In the WOD, " + wodProblem.getMessage(), new Position(htmlElementName.getStartOffset(), htmlElementName.getEndOffset() - htmlElementName.getStartOffset() + 1), lineNumber, wodProblem.isWarning() || PreferenceConstants.WARNING.equals(wodErrorsInHtmlSeverity));
                    WodModelUtils.createMarker(htmlFile, htmlProblem);
View Full Code Here


  @Override
  public void clear() {
    super.clear();
    _parserProblems = new LinkedList<HtmlProblem>();
    _htmlElementCache = new HtmlElementCache();
  }
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.bindings.wod.HtmlElementCache

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.