// Path: src/main/java/info/gianlucacosta/easypmd/ide/options/Options.java
// public interface Options {
// 
//     static OptionsChanges computeChanges(Options oldOptions, Options newOptions) {
//         if (oldOptions == null) {
//             return OptionsChanges.ENGINE;
//         }
// 
//         boolean noEngineChanges
//                 = Objects.equals(oldOptions.getTargetJavaVersion(), newOptions.getTargetJavaVersion())
//                 && Objects.equals(oldOptions.getSourceFileEncoding(), newOptions.getSourceFileEncoding())
//                 && Objects.equals(oldOptions.getSuppressMarker(), newOptions.getSuppressMarker())
//                 && CollectionItems.equals(oldOptions.getAdditionalClassPathUrls(), newOptions.getAdditionalClassPathUrls())
//                 && CollectionItems.equals(oldOptions.getRuleSets(), newOptions.getRuleSets())
//                 && (oldOptions.isShowAllMessagesInGuardedSections() == newOptions.isShowAllMessagesInGuardedSections())
//                 && Objects.equals(oldOptions.getPathFilteringOptions(), newOptions.getPathFilteringOptions())
//                 && (oldOptions.getMinimumPriority() == newOptions.getMinimumPriority())
//                 && Objects.equals(oldOptions.getAuxiliaryClassPath(), newOptions.getAuxiliaryClassPath())
//                 && (oldOptions.isUseScanMessagesCache() == newOptions.isUseScanMessagesCache());
// 
//         if (noEngineChanges) {
//             boolean noChanges
//                     = (oldOptions.isShowRulePriorityInTasks() == newOptions.isShowRulePriorityInTasks())
//                     && (oldOptions.isShowDescriptionInTasks() == newOptions.isShowDescriptionInTasks())
//                     && (oldOptions.isShowRuleInTasks() == newOptions.isShowRuleInTasks())
//                     && (oldOptions.isShowRuleSetInTasks() == newOptions.isShowRuleSetInTasks())
//                     && (oldOptions.isShowAnnotationsInEditor() == newOptions.isShowAnnotationsInEditor());
// 
//             if (noChanges) {
//                 return OptionsChanges.NONE;
//             } else {
//                 return OptionsChanges.VIEW_ONLY;
//             }
//         } else {
//             return OptionsChanges.ENGINE;
//         }
//     }
// 
//     String getTargetJavaVersion();
// 
//     String getSourceFileEncoding();
// 
//     String getSuppressMarker();
// 
//     Collection<URL> getAdditionalClassPathUrls();
// 
//     Collection<String> getRuleSets();
// 
//     boolean isUseScanMessagesCache();
// 
//     boolean isShowRulePriorityInTasks();
// 
//     boolean isShowDescriptionInTasks();
// 
//     boolean isShowRuleInTasks();
// 
//     boolean isShowRuleSetInTasks();
// 
//     boolean isShowAnnotationsInEditor();
// 
//     boolean isShowAllMessagesInGuardedSections();
// 
//     PathFilteringOptions getPathFilteringOptions();
// 
//     RulePriority getMinimumPriority();
// 
//     String getAuxiliaryClassPath();
// 
//     Options clone();
// }


import java.io.Serializable;
import info.gianlucacosta.easypmd.ide.options.Options;
/*
 * ==========================================================================%%#
 * EasyPmd
 * ===========================================================================%%
 * Copyright (C) 2009 - 2017 Gianluca Costa
 * ===========================================================================%%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/gpl-3.0.html>.
 * ==========================================================================%##
 */
package info.gianlucacosta.easypmd.ide.options.profiles;



/**
 * Default implementation of ProfileContext.
 */
public class DefaultProfileContext implements ProfileContext, Serializable {

    private final ProfileMap profileMap;
    private final String activeProfileName;

    public DefaultProfileContext(ProfileMap profileMap, String activeProfileName) {
        this.profileMap = profileMap;
        this.activeProfileName = activeProfileName;
    }

    @Override
    public ProfileMap getProfiles() {
        return profileMap;
    }

    @Override
    public String getActiveProfileName() {
        return activeProfileName;
    }

    @Override
// Path: src/main/java/info/gianlucacosta/easypmd/ide/options/Options.java
// public interface Options {
// 
//     static OptionsChanges computeChanges(Options oldOptions, Options newOptions) {
//         if (oldOptions == null) {
//             return OptionsChanges.ENGINE;
//         }
// 
//         boolean noEngineChanges
//                 = Objects.equals(oldOptions.getTargetJavaVersion(), newOptions.getTargetJavaVersion())
//                 && Objects.equals(oldOptions.getSourceFileEncoding(), newOptions.getSourceFileEncoding())
//                 && Objects.equals(oldOptions.getSuppressMarker(), newOptions.getSuppressMarker())
//                 && CollectionItems.equals(oldOptions.getAdditionalClassPathUrls(), newOptions.getAdditionalClassPathUrls())
//                 && CollectionItems.equals(oldOptions.getRuleSets(), newOptions.getRuleSets())
//                 && (oldOptions.isShowAllMessagesInGuardedSections() == newOptions.isShowAllMessagesInGuardedSections())
//                 && Objects.equals(oldOptions.getPathFilteringOptions(), newOptions.getPathFilteringOptions())
//                 && (oldOptions.getMinimumPriority() == newOptions.getMinimumPriority())
//                 && Objects.equals(oldOptions.getAuxiliaryClassPath(), newOptions.getAuxiliaryClassPath())
//                 && (oldOptions.isUseScanMessagesCache() == newOptions.isUseScanMessagesCache());
// 
//         if (noEngineChanges) {
//             boolean noChanges
//                     = (oldOptions.isShowRulePriorityInTasks() == newOptions.isShowRulePriorityInTasks())
//                     && (oldOptions.isShowDescriptionInTasks() == newOptions.isShowDescriptionInTasks())
//                     && (oldOptions.isShowRuleInTasks() == newOptions.isShowRuleInTasks())
//                     && (oldOptions.isShowRuleSetInTasks() == newOptions.isShowRuleSetInTasks())
//                     && (oldOptions.isShowAnnotationsInEditor() == newOptions.isShowAnnotationsInEditor());
// 
//             if (noChanges) {
//                 return OptionsChanges.NONE;
//             } else {
//                 return OptionsChanges.VIEW_ONLY;
//             }
//         } else {
//             return OptionsChanges.ENGINE;
//         }
//     }
// 
//     String getTargetJavaVersion();
// 
//     String getSourceFileEncoding();
// 
//     String getSuppressMarker();
// 
//     Collection<URL> getAdditionalClassPathUrls();
// 
//     Collection<String> getRuleSets();
// 
//     boolean isUseScanMessagesCache();
// 
//     boolean isShowRulePriorityInTasks();
// 
//     boolean isShowDescriptionInTasks();
// 
//     boolean isShowRuleInTasks();
// 
//     boolean isShowRuleSetInTasks();
// 
//     boolean isShowAnnotationsInEditor();
// 
//     boolean isShowAllMessagesInGuardedSections();
// 
//     PathFilteringOptions getPathFilteringOptions();
// 
//     RulePriority getMinimumPriority();
// 
//     String getAuxiliaryClassPath();
// 
//     Options clone();
// }


// Path: src/main/java/info/gianlucacosta/easypmd/ide/options/profiles/DefaultProfileContext.java
import java.io.Serializable;
import info.gianlucacosta.easypmd.ide.options.Options;

/*
 * ==========================================================================%%#
 * EasyPmd
 * ===========================================================================%%
 * Copyright (C) 2009 - 2017 Gianluca Costa
 * ===========================================================================%%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/gpl-3.0.html>.
 * ==========================================================================%##
 */
package info.gianlucacosta.easypmd.ide.options.profiles;



/**
 * Default implementation of ProfileContext.
 */
public class DefaultProfileContext implements ProfileContext, Serializable {

    private final ProfileMap profileMap;
    private final String activeProfileName;

    public DefaultProfileContext(ProfileMap profileMap, String activeProfileName) {
        this.profileMap = profileMap;
        this.activeProfileName = activeProfileName;
    }

    @Override
    public ProfileMap getProfiles() {
        return profileMap;
    }

    @Override
    public String getActiveProfileName() {
        return activeProfileName;
    }

    @Override
    public Options getActiveOptions() {