Package org.sylfra.idea.plugins.revu

Examples of org.sylfra.idea.plugins.revu.RevuException


      xstream.unmarshal(new DomDriver().createReader(new InputStreamReader(stream, "UTF-8")), null, xstreamDataHolder);
    }
    catch (Exception e)
    {
      LOGGER.warn(e);
      throw new RevuException(e);
    }
  }
View Full Code Here


        try
        {
          final VirtualFile vParentFile = RevuVfsUtils.findFile(file.getParent());
          if (vParentFile == null)
          {
            exception[0] = new RevuException("Parent directory does not exist: " + file.getParent());
            return;
          }

          chmodReviewFile(file);

          VirtualFile vFile = vParentFile.createChildData(this, file.getName());
          VfsUtil.saveText(vFile, writer.toString());
        }
        catch (RevuException e)
        {
          exception[0] = e;
        }
        catch (IOException e)
        {
          exception[0] = new RevuException(e);
        }
      }
    });

    if (exception[0] != null)
View Full Code Here

      {
        LOGGER.debug("Review file was readonly, chmoded it: " + file);
      }
      else
      {
        throw new RevuException("Review file is readonly and cannot chmod it: " + file);
      }
    }
  }
View Full Code Here

      xstreamDataHolder.put(ReviewExternalizerXmlImpl.CONTEXT_KEY_REVIEW, null);
      xstream.marshal(review, new XppDriver().createWriter(writer), xstreamDataHolder);
    }
    catch (XMLStreamException e)
    {
      throw new RevuException("Failed to serialize review: " + review, e);
    }
  }
View Full Code Here

  private void checkCyclicLink(@NotNull Review main, @NotNull Review extendedRoot, @NotNull Review extendedChild)
    throws RevuException
  {
    if (main.getName().equals(extendedChild.getName()))
    {
      throw new RevuException(
        RevuBundle.message("friendlyError.externalizing.cyclicReview.details.text",
          main.getFile(), main.getName(),
          extendedRoot.getFile(), extendedRoot.getName()));
    }
View Full Code Here

  private Editor buildEditor(@NotNull final VirtualFile vFile) throws RevuException
  {
    PsiFile psiFile = PsiManager.getInstance(project).findFile(vFile);
    if (psiFile == null)
    {
      throw new RevuException(RevuBundle.message("issueForm.preview.error.fileNotFound.text", vFile.getPath()));
    }

    Document document = PsiDocumentManager.getInstance(project).getDocument(psiFile);

    final Editor editor = EditorFactory.getInstance().createEditor(document, project, psiFile.getFileType(), true);
View Full Code Here

  private void checkCyclicLink(@NotNull Review main, @NotNull Review extendedRoot, @NotNull Review extendedChild)
    throws RevuException
  {
    if (main.getName().equals(extendedChild.getName()))
    {
      throw new RevuException(
        RevuBundle.message("friendlyError.externalizing.cyclicReview.details.text",
          main.getFile(), main.getName(),
          extendedRoot.getFile(), extendedRoot.getName()));
    }
View Full Code Here

  private Editor buildEditor(@NotNull final VirtualFile vFile) throws RevuException
  {
    PsiFile psiFile = PsiManager.getInstance(project).findFile(vFile);
    if (psiFile == null)
    {
      throw new RevuException(RevuBundle.message("issueForm.preview.error.fileNotFound.text", vFile.getPath()));
    }

    Document document = PsiDocumentManager.getInstance(project).getDocument(psiFile);

    final Editor editor = EditorFactory.getInstance().createEditor(document, project, psiFile.getFileType(), true);
View Full Code Here

      xstream.unmarshal(new DomDriver().createReader(new InputStreamReader(stream, "UTF-8")), null, xstreamDataHolder);
    }
    catch (Exception e)
    {
      LOGGER.warn(e);
      throw new RevuException(e);
    }
  }
View Full Code Here

      xstreamDataHolder.put(ReviewExternalizerXmlImpl.CONTEXT_KEY_REVIEW, null);
      xstream.marshal(review, new XppDriver().createWriter(writer), xstreamDataHolder);
    }
    catch (XMLStreamException e)
    {
      throw new RevuException("Failed to serialize review: " + review, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.sylfra.idea.plugins.revu.RevuException

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.