Examples of ICheckConfiguration


Examples of net.sf.eclipsecs.core.config.ICheckConfiguration

      final MavenPluginConfigurationTranslator cfgTranslator)
      throws CheckstylePluginException, CoreException {
        // get the ruleset from configLocation
        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);
        /**
         * 2. Load all properties
         */
        // get Properties from propertiesLocation
        final Properties props = cfgTranslator.getConfiguredProperties();
        cfgTranslator.updatePropertiesWithPropertyExpansion(props);
        // add the header file location to the props.
        String headerFile = cfgTranslator.getHeaderFile();
        if (headerFile != null) {
            props.setProperty("checkstyle.header.file", headerFile);
        }
        // add the suppressions file location to the props.
        String suppressionsFile = cfgTranslator.getSuppressionsFile();
        if (suppressionsFile != null) {
            props.setProperty(cfgTranslator.getSuppressionsFileExpression(),
                    suppressionsFile);
        }
        // add the cache file location to the props.
        props.setProperty("checkstyle.cache.file", ECLIPSE_CS_CACHE_FILENAME);
        // Load all properties in the checkConfig
        final List<ResolvableProperty> csProps =
                checkCfg.getResolvableProperties();
        csProps.clear();
        for (Map.Entry<Object, Object> entry : props.entrySet()) {
            csProps.add(new ResolvableProperty((String) entry.getKey(),
                    (String) entry.getValue()));
        }
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.