Example usage for com.intellij.openapi.options UnnamedConfigurable apply

List of usage examples for com.intellij.openapi.options UnnamedConfigurable apply

Introduction

In this page you can find the example usage for com.intellij.openapi.options UnnamedConfigurable apply.

Prototype

void apply() throws ConfigurationException;

Source Link

Document

Stores the settings from the Swing form to the configurable component.

Usage

From source file:com.intellij.codeEditor.printing.ExportToHTMLDialog.java

License:Apache License

public void apply() throws ConfigurationException {
    ExportToHTMLSettings exportToHTMLSettings = ExportToHTMLSettings.getInstance(myProject);

    if (myRbCurrentFile.isSelected()) {
        exportToHTMLSettings.setPrintScope(PrintSettings.PRINT_FILE);
    } else if (myRbSelectedText.isSelected()) {
        exportToHTMLSettings.setPrintScope(PrintSettings.PRINT_SELECTED_TEXT);
    } else if (myRbCurrentPackage.isSelected()) {
        exportToHTMLSettings.setPrintScope(PrintSettings.PRINT_DIRECTORY);
    }//w w w.  j a va 2 s  .c  om

    exportToHTMLSettings.setIncludeSubpackages(myCbIncludeSubpackages.isSelected());
    exportToHTMLSettings.PRINT_LINE_NUMBERS = myCbLineNumbers.isSelected();
    exportToHTMLSettings.OPEN_IN_BROWSER = myCbOpenInBrowser.isSelected();
    exportToHTMLSettings.OUTPUT_DIRECTORY = myTargetDirectoryField.getText();
    for (UnnamedConfigurable printOption : myExtensions) {
        printOption.apply();
    }
}

From source file:com.intellij.plugins.haxe.ide.projectStructure.ui.HaxeConfigurationEditor.java

License:Apache License

public void apply() {
    final HaxeModuleSettings settings = HaxeModuleSettings.getInstance(myModule);
    assert settings != null;
    settings.setMainClass(myMainClassFieldWithButton.getText());
    settings.setArguments(myAppArguments.getText());
    settings.setNmeFlags(myNMEArguments.getText());
    settings.setOpenFLFlags(myOpenFLArgumentTextField.getText());
    if (myNmmlFileRadioButton.isSelected()) {
        settings.setNmeTarget((NMETarget) myTargetComboBox.getSelectedItem());
    } else if (myOpenFLFileRadioButton.isSelected()) {
        settings.setOpenFLTarget((OpenFLTarget) myTargetComboBox.getSelectedItem());
    } else {//from   w  ww .  j  a  v a  2s .  c o  m
        settings.setHaxeTarget((HaxeTarget) myTargetComboBox.getSelectedItem());
    }
    settings.setExcludeFromCompilation(myExcludeFromCompilationCheckBox.isSelected());
    settings.setOutputFileName(myOutputFileNameTextField.getText());
    settings.setOutputFolder(myFolderTextField.getText());

    settings.setHxmlPath(FileUtil.toSystemIndependentName(myHxmlFileChooserTextField.getText()));
    settings.setOpenFLPath(FileUtil.toSystemIndependentName(myOpenFLFileChooserTextField.getText()));
    settings.setNmmlPath(FileUtil.toSystemIndependentName(myNMEFileChooserTextField.getText()));

    settings.setBuildConfig(getCurrentBuildConfig());
    for (UnnamedConfigurable configurable : configurables) {
        try {
            configurable.apply();
        } catch (ConfigurationException ignored) {
        }
    }

    final String url = myExtension.getCompilerOutputUrl();
    final String urlCandidate = VfsUtil.pathToUrl(myFolderTextField.getText());

    if (!urlCandidate.equals(url)) {
        myExtension.setCompilerOutputPath(urlCandidate);
        myExtension.commit();
    }
}

From source file:org.jetbrains.idea.maven.project.MavenImportingConfigurable.java

License:Apache License

public void apply() throws ConfigurationException {
    mySettingsForm.getData(myImportingSettings);

    MavenServerManager.getInstance().setUseMaven2(!myUseMaven3CheckBox.isSelected());
    MavenServerManager.getInstance().setMavenEmbedderVMOptions(myEmbedderVMOptions.getText());

    for (final UnnamedConfigurable additionalConfigurable : myAdditionalConfigurables) {
        additionalConfigurable.apply();
    }/*  w w  w. j  a va  2  s. c om*/
}

From source file:org.jetbrains.plugins.ruby.settings.RSettingsPane.java

License:Apache License

public void apply() throws ConfigurationException {
    for (UnnamedConfigurable configurable : configurableList) {
        configurable.apply();
    }/*  w  ww .  j a va2 s. c  o m*/
}