Examples of PMDPlugin


Examples of net.sourceforge.pmd.eclipse.plugin.PMDPlugin

   * @return the {@code File} instance of the ruleset file.
   * @throws CoreException
   */
  private File writeRuleSet(final IFile rulesetFile, final RuleSet ruleSet,
      final IProgressMonitor monitor) throws CoreException {
    final PMDPlugin pmdPlugin = PMDPlugin.getDefault();

    BufferedOutputStream outputStream = null;
    ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream();
    try {
      outputStream = new BufferedOutputStream(new FileOutputStream(
          rulesetFile.getLocation().toFile()));
      pmdPlugin.getRuleSetWriter().write(byteArrayStream, ruleSet);

      // ..and now we have two problems
      String fixedXml = byteArrayStream.toString()
          .replaceAll("\\<exclude\\>(.*)\\</exclude\\>",
              "<exclude name=\"$1\"/>");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.