OC-15178 Automatically set some settings when user selects Xcode behaviour [make WelcomeWizardUtil a pure data class]

This commit is contained in:
Stanislav Dombrovsky
2017-11-10 12:43:59 +03:00
parent 296f0a37c6
commit 9fb6e19a36
2 changed files with 14 additions and 3 deletions
@@ -15,7 +15,6 @@
*/
package com.intellij.ide;
import com.intellij.openapi.util.registry.Registry;
import org.jetbrains.annotations.Nullable;
import java.util.Collections;
@@ -34,6 +33,7 @@ public class WelcomeWizardUtil {
private static volatile Integer ourContinuationIndent;
private static volatile Integer ourAppearanceFontSize;
private static volatile String ourAppearanceFontFace;
private static volatile Boolean ourDisableBreakpointsOnClick;
private static final Set<String> ourFeaturedPluginsToInstall = new HashSet<>();
public static void setDefaultLAF(String laf) {
@@ -88,8 +88,12 @@ public class WelcomeWizardUtil {
ourFeaturedPluginsToInstall.addAll(pluginsToInstall);
}
public static void setDisableBreakpointsOnClick(boolean xcodeLikeBreakpoints) {
Registry.get("debugger.click.disable.breakpoints").setValue(xcodeLikeBreakpoints);
public static Boolean getDisableBreakpointsOnClick() {
return ourDisableBreakpointsOnClick;
}
public static void setDisableBreakpointsOnClick(Boolean disableBreakpointsOnClick) {
ourDisableBreakpointsOnClick = disableBreakpointsOnClick;
}
public static void setCompletionCaseSensitive(Integer completionCaseSensitive) {
@@ -23,6 +23,7 @@ import com.intellij.ide.ui.LafManager
import com.intellij.ide.ui.UISettings
import com.intellij.lang.Language
import com.intellij.openapi.components.ApplicationComponent
import com.intellij.openapi.util.registry.Registry
import com.intellij.psi.codeStyle.*
class WelcomeWizardHelper : ApplicationComponent {
@@ -34,6 +35,12 @@ class WelcomeWizardHelper : ApplicationComponent {
WelcomeWizardUtil.getManualOrder()?.let {
ProjectViewSharedSettings.instance.manualOrder = it
}
//Debugger settings
WelcomeWizardUtil.getDisableBreakpointsOnClick()?.let{
Registry.get("debugger.click.disable.breakpoints").setValue(it)
}
//Code insight settings
WelcomeWizardUtil.getCompletionCaseSensitive()?.let {
CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE = it