Examples of CheckStylePluginException


Examples of net.sf.eclipsecs.core.util.CheckstylePluginException

        final URL ruleset = cfgTranslator.getRuleset();
        // build or get the checkconfig
        final ICheckConfiguration checkCfg =
                this.createOrGetCheckstyleConfig(pcWorkingCopy, ruleset, cfgTranslator.getExecutionId());
        if (checkCfg == null) {
            throw new CheckstylePluginException(
                    String.format("Failed to construct CheckConfig,SKIPPING checkstyle configuration"));
        }
        // update filesets (include and exclude patterns)
        cfgTranslator.updateCheckConfigWithIncludeExcludePatterns(pcWorkingCopy, checkCfg);
        /**
 
View Full Code Here

Examples of net.sf.eclipsecs.core.util.CheckstylePluginException

                if (configName.equals(copy.getName())) {
                    if (this.remoteConfigurationType.equals(copy.getType())) {
                        workingCopy = copy;
                        break;
                    }
                    throw new CheckstylePluginException(String.format(
                            "A local Checkstyle configuration allready exists with name "
                                    + " [%s] with incompatible type [%s]",
                            configName, copy.getType()));
                }
            }
View Full Code Here

Examples of net.sf.eclipsecs.core.util.CheckstylePluginException

    public URL getRuleset() throws CheckstylePluginException, CoreException {
        final URL ruleset =
                this.resourceResolver.resolveLocation(this.getConfigLocation());
        if (ruleset == null) {
            throw new CheckstylePluginException(
                    String.format("Failed to resolve RuleSet from configLocation,SKIPPING Eclipse checkstyle configuration"));
        }
        return ruleset;
    }
View Full Code Here

Examples of net.sf.eclipsecs.core.util.CheckstylePluginException

    private void copyOut(URL src, File dest) throws CheckstylePluginException {
        try {
            FileUtils.copyURLToFile(src, dest);
        } catch (IOException e) {
            throw new CheckstylePluginException("Failed to copy file "
                    + src.getFile()
                    + ", SKIPPING Eclipse checkstyle configuration");
        }
    }
View Full Code Here

Examples of net.sf.eclipsecs.core.util.CheckstylePluginException

        Properties properties = new Properties();
        if (propertiesLocation != null) {
            final URL url =
                    this.resourceResolver.resolveLocation(propertiesLocation);
            if (url == null) {
                throw new CheckstylePluginException(String.format(
                        "Failed to resolve propertiesLocation [%s]",
                        propertiesLocation));
            }
            try {
                properties.load(url.openStream());
            } catch (IOException e) {
                throw new CheckstylePluginException(
                        String.format(
                                "Failed to LOAD properties from propertiesLocation [%s]",
                                propertiesLocation));
            }
        }
View Full Code Here

Examples of net.sf.eclipsecs.core.util.CheckstylePluginException

                // beware of windows path separator
                final String escapedPropertyExpansion =
                        StringEscapeUtils.escapeJava(propertyExpansion);
                props.load(new StringReader(escapedPropertyExpansion));
            } catch (IOException e) {
                throw new CheckstylePluginException(String.format(
                        "[%s]: Failed to checkstyle propertyExpansion [%s]",
                        CheckstyleEclipseConstants.LOG_PREFIX,
                        propertyExpansion));
            }
        }
View Full Code Here

Examples of org.infernus.idea.checkstyle.exception.CheckStylePluginException

            final ChangeListManager changeListManager = ChangeListManager.getInstance(project);
            project.getComponent(CheckStylePlugin.class).checkFiles(filesFor(changeListManager.getDefaultChangeList()), getSelectedOverride(toolWindow));

        } catch (Throwable e) {
            final CheckStylePluginException processed = CheckStylePlugin.processError(null, e);
            if (processed != null) {
                LOG.error("Modified files scan failed", processed);
            }
        }
    }
View Full Code Here

Examples of org.infernus.idea.checkstyle.exception.CheckStylePluginException

            } else {
                presentation.setEnabled(!checkStylePlugin.isScanInProgress());
            }

        } catch (Throwable e) {
            final CheckStylePluginException processed
                    = CheckStylePlugin.processError(null, e);
            if (processed != null) {
                LOG.error("Button update failed.", processed);
            }
        }
View Full Code Here

Examples of org.infernus.idea.checkstyle.exception.CheckStylePluginException

            if (configurationLocation != null) {
                configurationLocation.blacklist();
            }

            throw new CheckStylePluginException("Couldn't create Checker", e);
        }
    }
View Full Code Here

Examples of org.infernus.idea.checkstyle.exception.CheckStylePluginException

            LOG.info("Loading configuration from " + configurationLocation);
            return getCheckerFactory().getConfig(configurationLocation, module);

        } catch (Exception e) {
            LOG.error("Checker could not be created.", e);
            throw new CheckStylePluginException("Couldn't create Checker", e);
        }
    }
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.