Examples of JUnitGeneratorSettings


Examples of org.intellij.plugins.junitgen.bean.JUnitGeneratorSettings

            name = "JUnitGeneratorAppSettings",
            storages = {
                    @Storage(id = "default", file = StoragePathMacros.APP_CONFIG + "/junitgenerator-app-settings.xml")})
    public static class AppSettings extends JUnitGeneratorConfigurable {
        public AppSettings() {
            super(new JUnitGeneratorSettings(), null);
        }
View Full Code Here

Examples of org.intellij.plugins.junitgen.bean.JUnitGeneratorSettings

            storages = {
                    @Storage(id = "default", file = StoragePathMacros.PROJECT_FILE),
                    @Storage(id = "dir", file = StoragePathMacros.PROJECT_CONFIG_DIR + "/junitgenerator-prj-settings.xml", scheme = StorageScheme.DIRECTORY_BASED)})
    public static class PrjSettings extends JUnitGeneratorConfigurable {
        public PrjSettings(Project project) {
            super(new JUnitGeneratorSettings(), project);
        }
View Full Code Here

Examples of org.intellij.plugins.junitgen.bean.JUnitGeneratorSettings

        watcher.register(panel);
        //capture the click event on the label
        this.loadDefaultsLabel.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                reset(new JUnitGeneratorSettings());
            }
        });
        createEditors(settings);
    }
View Full Code Here

Examples of org.intellij.plugins.junitgen.bean.JUnitGeneratorSettings

        return panel;
    }

    public void apply() {
        if (this.settings == null) {
            this.settings = new JUnitGeneratorSettings();
        }
        this.settings.setUseProjectSettings(this.settingsTypeComboBox.getSelectedIndex() > 0);
        this.settings.setOutputFilePattern(this.outputTextBox.getText());
        this.settings.setSelectedTemplateKey((String) this.selectedTemplateComboBox.getSelectedItem());
        this.settings.setCombineGetterAndSetter(this.combineGetterAndSetterCheckBox.isSelected());
View Full Code Here

Examples of org.intellij.plugins.junitgen.bean.JUnitGeneratorSettings

     *
     * @param uiSettings the settings to apply
     */
    public void reset(JUnitGeneratorSettings uiSettings) {
        if (uiSettings == null) {
            uiSettings = new JUnitGeneratorSettings();
        }
        this.settingsTypeComboBox.setSelectedIndex(
                this.project != null && uiSettings.isUseProjectSettings() ? SETTINGS_INDEX_PRJ : SETTINGS_INDEX_APP);
        this.outputTextBox.setText(uiSettings.getOutputFilePattern());
        this.selectedTemplateComboBox.setSelectedItem(uiSettings.getSelectedTemplateKey());
View Full Code Here

Examples of org.intellij.plugins.junitgen.bean.JUnitGeneratorSettings

    /**
     * copy the global settings in but maintain the 'project settings' type
     */
    private void copyApplicationSettingsToProject() {
        JUnitGeneratorSettings appSettings = JUnitGeneratorUtil.getInstance();
        appSettings.setUseProjectSettings(this.settings.isUseProjectSettings());
        reset(appSettings);
        //also mark us as modified
        this.modified = true;
    }
View Full Code Here

Examples of org.intellij.plugins.junitgen.bean.JUnitGeneratorSettings

     * Return an instance from the service manager
     *
     * @return the settings instance
     */
    public static JUnitGeneratorSettings getInstance() {
        JUnitGeneratorSettings settings = ServiceManager.getService(JUnitGeneratorConfigurable.AppSettings.class).getState();
        //force the project settings flag to be false because this is the app settings
        if ( settings != null ) {
            settings.setUseProjectSettings(false);
        }
        return settings;
    }
View Full Code Here

Examples of org.intellij.plugins.junitgen.bean.JUnitGeneratorSettings

     *
     * @param project the project
     * @return the settings instance
     */
    public static JUnitGeneratorSettings getInstance(Project project) {
        JUnitGeneratorSettings settings = getProjectSettings(project);
        if (!settings.isUseProjectSettings()) {
            if (log.isDebugEnabled()) {
                log.debug("Project is configured for global settings, so we return the global settings");
            }
            //copy the global settings over
            XmlSerializerUtil.copyBean(getInstance(), settings);
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.