public synchronized void processError(final SAXParseException ex, final boolean warning) {
    if (myErrors.size() == 0 && myErrorsView == null) {
      myErrorsView = new NewErrorTreeViewPanel(myProject, null, true, true, null);
      myErrorsView.setProcessController(myProcessController);
      openMessageViewImpl();
    }
    final String error = ex.getLineNumber() + "|" + ex.getColumnNumber() + "|" + ex.getSystemId() + "|" + ex.getLocalizedMessage();
    if (!myErrors.add(error)) {
      return;
    }

    VirtualFile file = null;
    final String systemId = ex.getSystemId();
    if (systemId != null) {
      try {
        file = VfsUtil.findFileByURL(new URL(systemId));
      } catch (MalformedURLException e) {
        LOG.warn("systemId = " + systemId);
        LOG.error(e);
      }
    }

    final VirtualFile file1 = file;
    ApplicationManager.getApplication().invokeLater(
      () -> myErrorsView.addMessage(
        warning ? MessageCategory.WARNING : MessageCategory.ERROR,
        new String[]{ex.getLocalizedMessage()},
        file1,
        ex.getLineNumber() - 1,
        ex.getColumnNumber() - 1, null)
    );
  }
public synchronized void processError(final SAXParseException ex, final boolean warning)