Package com.munian.ivy.module.options

Examples of com.munian.ivy.module.options.IvyOptions


        this.project = project;
    }

    @Override
    protected void projectOpened() {
        IvyOptions optionsLookup = Lookup.getDefault().lookup(IvyOptions.class);
        ProjectPreferences preferences = project.getLookup().lookup(ProjectPreferences.class);
        optionsLookup.addPropertyChangeListener(preferences);
        preferences.autoResolveProject();
    }
View Full Code Here


        preferences.autoResolveProject();
    }

    @Override
    protected void projectClosed() {
        IvyOptions optionsLookup = Lookup.getDefault().lookup(IvyOptions.class);
        ProjectPreferences preferences = project.getLookup().lookup(ProjectPreferences.class);
        optionsLookup.removePropertyChangeListener(preferences);
        preferences.clearListeners();
    }
View Full Code Here

    }

    private void loadPreferences() {
        EditableProperties properties = getEditableProperties();
        ivyEnabled = Utilities.getBoolean(properties.get(IVY_ENABLED_KEY), false);
        IvyOptions optionsLookup = Lookup.getDefault().lookup(IvyOptions.class);

        if (ivyEnabled) {
            Collection<String> propertiesFiles = Utilities.stringToCollection(properties.get(IVY_PROPERTIES_FILES_KEY));
            setIvySettingsFile(properties.get(IVY_SETTINGS_FILE_KEY));
            setIvyFile(properties.get(IVY_FILE_KEY));

            for (String propertyFile : propertiesFiles) {
                addPropertyFile(propertyFile);
            }

            globalRetrieveSettingsName = properties.get(IVY_GLOBAL_RETRIEVE_NAME_KEY);
            if (Utilities.isNotNullOrEmpty(globalRetrieveSettingsName)) {
                updateTemplateSettings(optionsLookup, properties);
            } else {
                projectRetrieveSettings = loadIvyRetrieveSettings(properties);
                useGlobalRetrieveSettings = false;
            }

            autoResolve = Utilities.getBoolean(properties.get(IVY_AUTO_RESOLVE_KEY), true);
            useCachePath = Utilities.getBoolean(properties.get(IVY_USE_CACHE_PATH_KEY), true);
            allConfsSelected = Utilities.getBoolean(properties.get(IVY_ALL_CONFS_SELECTED_KEY), true);
            if (!allConfsSelected){
                Collection<String> savedSelectedConfs = Utilities.stringToCollection(properties.get(IVY_SELECTED_CONFS_KEY));
                selectedConfs.addAll(savedSelectedConfs);
            }
        } else {
            String templateName = optionsLookup.getDefaultTemplateName();
            projectRetrieveSettings = optionsLookup.getIvyRetrieveSettingsTemplate(templateName);
            useGlobalRetrieveSettings = true;
            globalRetrieveSettingsName = templateName;
            autoResolve = true;
        }
View Full Code Here

        if (ivyEnabled) {
            if (IvyOptions.OPTIONS_CHANGE.equals(evt.getPropertyName())) {
            } else if (IvyOptions.OPTIONS_TEMPLATE_CHANGE.equals(evt.getPropertyName())) {
                if (useGlobalRetrieveSettings) {
                    EditableProperties properties = getEditableProperties();
                    IvyOptions optionsLookup = Lookup.getDefault().lookup(IvyOptions.class);
                    updateTemplateSettings(optionsLookup, properties);
                }
            }
        }
    }
View Full Code Here

    @Override
    public JComponent createComponent(Category category, Lookup context) {
        Project project = context.lookup(Project.class);
        EditablePreferences projectPreferencesLookup = project.getLookup().lookup(EditablePreferences.class);
        IvyOptions optionsLookup = Lookup.getDefault().lookup(IvyOptions.class);
        IvyFacade ivyFacade = Lookup.getDefault().lookup(IvyFacade.class);
       
        CustomizerPanel panel = new CustomizerPanel(projectPreferencesLookup,optionsLookup,ivyFacade);
        category.setOkButtonListener(panel.getActionListener());
        return panel;
View Full Code Here

TOP

Related Classes of com.munian.ivy.module.options.IvyOptions

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.