Search in sources :

Example 1 with GroovyApplicationSettings

use of org.jetbrains.plugins.groovy.settings.GroovyApplicationSettings in project intellij-community by JetBrains.

the class GroovyExtractMethodDialog method doOKAction.

@Override
protected void doOKAction() {
    myHelper.setForceReturn(myForceReturnCheckBox.isSelected());
    String name = getEnteredName();
    if (name == null)
        return;
    GrMethod method = ExtractUtil.createMethod(myHelper);
    if (method != null && !validateMethod(method, myHelper)) {
        return;
    }
    final GroovyApplicationSettings settings = GroovyApplicationSettings.getInstance();
    if (myCbSpecifyType.isEnabled()) {
        settings.EXTRACT_METHOD_SPECIFY_TYPE = myCbSpecifyType.isSelected();
    }
    if (myForceReturnCheckBox.isEnabled()) {
        settings.FORCE_RETURN = myForceReturnCheckBox.isSelected();
    }
    settings.EXTRACT_METHOD_VISIBILITY = myVisibilityPanel.getVisibility();
    super.doOKAction();
}
Also used : GroovyApplicationSettings(org.jetbrains.plugins.groovy.settings.GroovyApplicationSettings) GrMethod(org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMethod)

Aggregations

GrMethod (org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMethod)1 GroovyApplicationSettings (org.jetbrains.plugins.groovy.settings.GroovyApplicationSettings)1