From 9e45c660cf712017daad3775441d785763dfb402 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Wed, 26 Aug 2015 12:30:26 +0200 Subject: [PATCH] IDEA-CR-4183 undeprecate setValue(name, string) Null value as default value --- .../actions/GenerateAntBuildDialog.java | 23 ++++++++----------- .../actions/ObjectMarkupPropertiesDialog.java | 7 +++--- .../AnonymousTargetClassPreselectionUtil.java | 4 ++-- .../JavaOverrideImplementMemberChooser.java | 6 ++--- .../impl/CreateFieldFromParameterDialog.java | 9 +++++--- .../InferNullityAnnotationsAction.java | 6 ++--- .../ide/util/PackageChooserDialog.java | 2 +- .../extractMethod/ExtractMethodDialog.java | 2 +- .../IntroduceConstantDialog.java | 6 ++--- .../IntroduceFieldCentralPanel.java | 4 ++-- .../refactoring/move/MoveDialogBase.java | 4 ++-- .../createTest/CreateTestAction.java | 4 ++-- .../createTest/CreateTestDialog.java | 6 ++--- .../ide/util/PropertiesComponent.java | 14 +++++++---- .../ide/util/PropertiesComponentImpl.java | 10 -------- .../openapi/diff/impl/dir/DirDiffPanel.java | 5 ++-- .../dir/actions/popup/WarnOnDeletion.java | 4 ++-- .../devkit/src/dom/generator/DomGenPanel.java | 4 ++-- .../EditorConfigNotifierProvider.java | 2 +- .../project/GradleStartupActivity.java | 4 ++-- .../java/decompiler/IdeaDecompiler.java | 2 +- .../CreateResourceBundleDialogComponent.java | 4 ++-- .../edu/learning/PyStudyShowTutorial.java | 2 +- 23 files changed, 64 insertions(+), 70 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/actions/GenerateAntBuildDialog.java b/java/compiler/impl/src/com/intellij/compiler/actions/GenerateAntBuildDialog.java index 8d7f05cb3daf..d19015f2677d 100644 --- a/java/compiler/impl/src/com/intellij/compiler/actions/GenerateAntBuildDialog.java +++ b/java/compiler/impl/src/com/intellij/compiler/actions/GenerateAntBuildDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.openapi.ui.MultiLineLabelUI; import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.IdeBorderFactory; import com.intellij.ui.ScrollPaneFactory; import com.intellij.util.ArrayUtil; @@ -129,19 +130,13 @@ public class GenerateAntBuildDialog extends DialogWrapper { private void saveSettings() { final PropertiesComponent properties = PropertiesComponent.getInstance(myProject); - properties.setValue(SINGLE_FILE_PROPERTY, Boolean.toString(myRbGenerateSingleFileBuild.isSelected())); - properties.setValue(UI_FORM_PROPERTY, Boolean.toString(myCbEnableUIFormsCompilation.isSelected())); - properties.setValue(FORCE_TARGET_JDK_PROPERTY, Boolean.toString(myCbForceTargetJdk.isSelected())); - properties.setValue(BACKUP_FILES_PROPERTY, Boolean.toString(myRbBackupFiles.isSelected())); - properties.setValue(INLINE_RUNTIME_CLASSPATH_PROPERTY, Boolean.toString(myCbInlineRuntimeClasspath.isSelected())); - properties.setValue(GENERATE_IDEA_HOME_PROPERTY, Boolean.toString(myGenerateIdeaHomeProperty.isSelected())); - final String outputFileName = getOutputFileName(); - if (outputFileName.length() > 0) { - properties.setValue(OUTPUT_FILE_NAME_PROPERTY, outputFileName); - } - else { - properties.unsetValue(OUTPUT_FILE_NAME_PROPERTY); - } + properties.setValue(SINGLE_FILE_PROPERTY, myRbGenerateSingleFileBuild.isSelected()); + properties.setValue(UI_FORM_PROPERTY, myCbEnableUIFormsCompilation.isSelected()); + properties.setValue(FORCE_TARGET_JDK_PROPERTY, myCbForceTargetJdk.isSelected()); + properties.setValue(BACKUP_FILES_PROPERTY, myRbBackupFiles.isSelected()); + properties.setValue(INLINE_RUNTIME_CLASSPATH_PROPERTY, myCbInlineRuntimeClasspath.isSelected()); + properties.setValue(GENERATE_IDEA_HOME_PROPERTY, myGenerateIdeaHomeProperty.isSelected()); + properties.setValue(OUTPUT_FILE_NAME_PROPERTY, StringUtil.nullize(getOutputFileName())); } public void dispose() { diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/ObjectMarkupPropertiesDialog.java b/java/debugger/impl/src/com/intellij/debugger/actions/ObjectMarkupPropertiesDialog.java index 454b130307cf..727cb31f7b41 100644 --- a/java/debugger/impl/src/com/intellij/debugger/actions/ObjectMarkupPropertiesDialog.java +++ b/java/debugger/impl/src/com/intellij/debugger/actions/ObjectMarkupPropertiesDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,7 @@ import java.awt.*; */ public class ObjectMarkupPropertiesDialog extends ValueMarkerPresentationDialogBase { @NonNls private static final String MARK_ALL_REFERENCED_VALUES_KEY = "debugger.mark.all.referenced.values"; + private static final boolean MARK_ALL_REFERENCED_VALUES_DEFAULT_VALUE = true; private JCheckBox myCbMarkAdditionalFields; private final boolean mySuggestAdditionalMarkup; private JPanel myAdditionalPropertiesPanel; @@ -41,14 +42,14 @@ public class ObjectMarkupPropertiesDialog extends ValueMarkerPresentationDialogB mySuggestAdditionalMarkup = suggestAdditionalMarkup; myDescriptionLabel.setText("If the value is referenced by a constant field of an abstract class,\n" + "IDEA could additionally mark all values referenced from this class with the names of referencing fields."); - myCbMarkAdditionalFields.setSelected(PropertiesComponent.getInstance().getBoolean(MARK_ALL_REFERENCED_VALUES_KEY, true)); + myCbMarkAdditionalFields.setSelected(PropertiesComponent.getInstance().getBoolean(MARK_ALL_REFERENCED_VALUES_KEY, MARK_ALL_REFERENCED_VALUES_DEFAULT_VALUE)); init(); } @Override protected void doOKAction() { if (mySuggestAdditionalMarkup) { - PropertiesComponent.getInstance().setValue(MARK_ALL_REFERENCED_VALUES_KEY, Boolean.toString(myCbMarkAdditionalFields.isSelected())); + PropertiesComponent.getInstance().setValue(MARK_ALL_REFERENCED_VALUES_KEY, myCbMarkAdditionalFields.isSelected(), MARK_ALL_REFERENCED_VALUES_DEFAULT_VALUE); } super.doOKAction(); } diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AnonymousTargetClassPreselectionUtil.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AnonymousTargetClassPreselectionUtil.java index 421c43cabe88..c05419f23366 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AnonymousTargetClassPreselectionUtil.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AnonymousTargetClassPreselectionUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ public class AnonymousTargetClassPreselectionUtil { public static void rememberSelection(PsiClass aClass, PsiClass firstClass) { if (firstClass instanceof PsiAnonymousClass) { - PropertiesComponent.getInstance().setValue(PRESELECT_ANONYMOUS, String.valueOf(aClass == firstClass)); + PropertiesComponent.getInstance().setValue(PRESELECT_ANONYMOUS, aClass == firstClass); } } diff --git a/java/java-impl/src/com/intellij/codeInsight/generation/JavaOverrideImplementMemberChooser.java b/java/java-impl/src/com/intellij/codeInsight/generation/JavaOverrideImplementMemberChooser.java index 3aa70fc8cfff..ea43e95e1e3d 100644 --- a/java/java-impl/src/com/intellij/codeInsight/generation/JavaOverrideImplementMemberChooser.java +++ b/java/java-impl/src/com/intellij/codeInsight/generation/JavaOverrideImplementMemberChooser.java @@ -86,7 +86,7 @@ public class JavaOverrideImplementMemberChooser extends MemberChooser modulesWithoutAnnotations = new HashSet(); @@ -344,7 +344,7 @@ public class InferNullityAnnotationsAction extends BaseAnalysisAction { protected JComponent getAdditionalActionSettings(Project project, BaseAnalysisActionDialog dialog) { final JPanel panel = new JPanel(new VerticalFlowLayout()); panel.add(new TitledSeparator()); - myAnnotateLocalVariablesCb = new JCheckBox("Annotate local variables", PropertiesComponent.getInstance().getBoolean(ANNOTATE_LOCAL_VARIABLES, false)); + myAnnotateLocalVariablesCb = new JCheckBox("Annotate local variables", PropertiesComponent.getInstance().getBoolean(ANNOTATE_LOCAL_VARIABLES)); panel.add(myAnnotateLocalVariablesCb); return panel; } diff --git a/java/java-impl/src/com/intellij/ide/util/PackageChooserDialog.java b/java/java-impl/src/com/intellij/ide/util/PackageChooserDialog.java index 8692fb4a54c7..a8380b5aa288 100644 --- a/java/java-impl/src/com/intellij/ide/util/PackageChooserDialog.java +++ b/java/java-impl/src/com/intellij/ide/util/PackageChooserDialog.java @@ -202,7 +202,7 @@ public class PackageChooserDialog extends PackageChooser { private void toggleShowPathComponent(JPanel northPanel, TextFieldAction fieldAction) { boolean toShowTextField = !isPathShowing(); - PropertiesComponent.getInstance().setValue(FileChooserDialogImpl.FILE_CHOOSER_SHOW_PATH_PROPERTY, Boolean.toString(toShowTextField)); + PropertiesComponent.getInstance().setValue(FileChooserDialogImpl.FILE_CHOOSER_SHOW_PATH_PROPERTY, toShowTextField, true); myPathEditor.setVisible(toShowTextField); fieldAction.update(); northPanel.revalidate(); diff --git a/java/java-impl/src/com/intellij/refactoring/extractMethod/ExtractMethodDialog.java b/java/java-impl/src/com/intellij/refactoring/extractMethod/ExtractMethodDialog.java index 259d97ea5a23..b0cc0515e7c6 100644 --- a/java/java-impl/src/com/intellij/refactoring/extractMethod/ExtractMethodDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/extractMethod/ExtractMethodDialog.java @@ -193,7 +193,7 @@ public class ExtractMethodDialog extends DialogWrapper implements AbstractExtrac } if (myGenerateAnnotations != null && myGenerateAnnotations.isEnabled()) { - PropertiesComponent.getInstance(myProject).setValue(EXTRACT_METHOD_GENERATE_ANNOTATIONS, String.valueOf(myGenerateAnnotations.isSelected())); + PropertiesComponent.getInstance(myProject).setValue(EXTRACT_METHOD_GENERATE_ANNOTATIONS, myGenerateAnnotations.isSelected(), true); } super.doOKAction(); } diff --git a/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceConstantDialog.java b/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceConstantDialog.java index d39cc8a1035e..d555b4cde762 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceConstantDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceConstantDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -272,10 +272,10 @@ class IntroduceConstantDialog extends DialogWrapper { LanguageLevelProjectExtension.getInstance(psiManager.getProject()).getLanguageLevel().isAtLeast(LanguageLevel.JDK_1_5) && JavaPsiFacade.getInstance(psiManager.getProject()).findClass(AnnotationUtil.NON_NLS, myParentClass.getResolveScope()) != null) { final PropertiesComponent component = PropertiesComponent.getInstance(myProject); - myCbNonNls.setSelected(component.isTrueValue(NONNLS_SELECTED_PROPERTY)); + myCbNonNls.setSelected(component.getBoolean(NONNLS_SELECTED_PROPERTY)); myCbNonNls.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { - component.setValue(NONNLS_SELECTED_PROPERTY, Boolean.toString(myCbNonNls.isSelected())); + component.setValue(NONNLS_SELECTED_PROPERTY, myCbNonNls.isSelected()); } }); } else { diff --git a/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldCentralPanel.java b/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldCentralPanel.java index 78e643427769..fa4cadf8cbd9 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldCentralPanel.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceFieldCentralPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -329,7 +329,7 @@ public abstract class IntroduceFieldCentralPanel { public void saveFinalState() { if (myCbFinal != null && myCbFinal.isEnabled()) { ourLastCbFinalState = myCbFinal.isSelected(); - PropertiesComponent.getInstance().setValue(INTRODUCE_FIELD_FINAL_CHECKBOX, String.valueOf(ourLastCbFinalState)); + PropertiesComponent.getInstance().setValue(INTRODUCE_FIELD_FINAL_CHECKBOX, ourLastCbFinalState, true); } } diff --git a/java/java-impl/src/com/intellij/refactoring/move/MoveDialogBase.java b/java/java-impl/src/com/intellij/refactoring/move/MoveDialogBase.java index 256aacb6876f..24f6f342f98d 100644 --- a/java/java-impl/src/com/intellij/refactoring/move/MoveDialogBase.java +++ b/java/java-impl/src/com/intellij/refactoring/move/MoveDialogBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ public abstract class MoveDialogBase extends RefactoringDialog { protected void saveOpenInEditorOption() { if (myOpenEditorCb != null) { - PropertiesComponent.getInstance().setValue("Move" + getMovePropertySuffix() +".OpenInEditor", String.valueOf(myOpenEditorCb.isSelected())); + PropertiesComponent.getInstance().setValue("Move" + getMovePropertySuffix() +".OpenInEditor", myOpenEditorCb.isSelected(), isEnabledByDefault()); } } diff --git a/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestAction.java b/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestAction.java index 772e9563d0fd..9bc8593acb15 100644 --- a/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestAction.java +++ b/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,7 +112,7 @@ public class CreateTestAction extends PsiElementBaseIntentionAction { return; } - propertiesComponent.setValue(CREATE_TEST_IN_THE_SAME_ROOT, String.valueOf(true)); + propertiesComponent.setValue(CREATE_TEST_IN_THE_SAME_ROOT, true); } final CreateTestDialog d = createTestDialog(project, srcModule, srcClass, srcPackage); diff --git a/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java b/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java index adcf7594a061..7c32c7436948 100644 --- a/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java +++ b/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java @@ -186,13 +186,11 @@ public class CreateTestDialog extends DialogWrapper { } private void restoreShowInheritedMembersStatus() { - String v = getProperties().getValue(SHOW_INHERITED_MEMBERS_PROPERTY); - myShowInheritedMethodsBox.setSelected(v != null && v.equals("true")); + myShowInheritedMethodsBox.setSelected(getProperties().getBoolean(SHOW_INHERITED_MEMBERS_PROPERTY)); } private void saveShowInheritedMembersStatus() { - boolean v = myShowInheritedMethodsBox.isSelected(); - getProperties().setValue(SHOW_INHERITED_MEMBERS_PROPERTY, Boolean.toString(v)); + getProperties().setValue(SHOW_INHERITED_MEMBERS_PROPERTY, myShowInheritedMethodsBox.isSelected()); } private PropertiesComponent getProperties() { diff --git a/platform/core-api/src/com/intellij/ide/util/PropertiesComponent.java b/platform/core-api/src/com/intellij/ide/util/PropertiesComponent.java index acc2978bb713..b182fa9c3215 100644 --- a/platform/core-api/src/com/intellij/ide/util/PropertiesComponent.java +++ b/platform/core-api/src/com/intellij/ide/util/PropertiesComponent.java @@ -42,7 +42,7 @@ public abstract class PropertiesComponent { public abstract String getValue(@NonNls String name); /** - * @deprecated Use {@link #setValue(String, String, String)} to avoid write defaults. + * Consider to use {@link #setValue(String, String, String)} to avoid write defaults. */ public abstract void setValue(@NotNull String name, @Nullable String value); @@ -64,10 +64,12 @@ public abstract class PropertiesComponent { /** * Set value or unset if equals to false */ - public abstract void setValue(@NotNull String name, boolean value); + public final void setValue(@NotNull String name, boolean value) { + setValue(name, value, false); + } /** - * Set value or unset if equals to false + * Set value or unset if equals to default */ public abstract void setValue(@NotNull String name, boolean value, boolean defaultValue); @@ -88,10 +90,14 @@ public abstract class PropertiesComponent { return Boolean.valueOf(getValue(name)).booleanValue(); } - public final boolean getBoolean(@NonNls String name, boolean defaultValue) { + public final boolean getBoolean(@NotNull String name, boolean defaultValue) { return isValueSet(name) ? isTrueValue(name) : defaultValue; } + public final boolean getBoolean(@NotNull String name) { + return getBoolean(name, false); + } + @NotNull public String getValue(@NonNls String name, @NotNull String defaultValue) { if (!isValueSet(name)) { diff --git a/platform/core-impl/src/com/intellij/ide/util/PropertiesComponentImpl.java b/platform/core-impl/src/com/intellij/ide/util/PropertiesComponentImpl.java index 43238ad7b8a0..25b2dc5ed02f 100644 --- a/platform/core-impl/src/com/intellij/ide/util/PropertiesComponentImpl.java +++ b/platform/core-impl/src/com/intellij/ide/util/PropertiesComponentImpl.java @@ -117,16 +117,6 @@ public class PropertiesComponentImpl extends PropertiesComponent implements Pers } } - @Override - public void setValue(@NotNull String name, boolean value) { - if (value) { - setValue(name, "true"); - } - else { - myMap.remove(name); - } - } - @Override public void setValue(@NotNull String name, boolean value, boolean defaultValue) { if (value == defaultValue) { diff --git a/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/DirDiffPanel.java b/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/DirDiffPanel.java index abe75c5bb8a7..ec27c53c7cf7 100644 --- a/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/DirDiffPanel.java +++ b/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/DirDiffPanel.java @@ -70,6 +70,7 @@ import java.util.concurrent.atomic.AtomicBoolean; @SuppressWarnings({"unchecked"}) public class DirDiffPanel implements Disposable, DataProvider { public static final String DIVIDER_PROPERTY = "dir.diff.panel.divider.location"; + private static final int DIVIDER_PROPERTY_DEFAULT_VALUE = 200; private JPanel myDiffPanel; private JBTable myTable; private JPanel myComponent; @@ -506,7 +507,7 @@ public class DirDiffPanel implements Disposable, DataProvider { public void dispose() { myModel.stopUpdating(); - PropertiesComponent.getInstance().setValue(DIVIDER_PROPERTY, String.valueOf(mySplitPanel.getDividerLocation())); + PropertiesComponent.getInstance().setValue(DIVIDER_PROPERTY, mySplitPanel.getDividerLocation(), DIVIDER_PROPERTY_DEFAULT_VALUE); clearDiffPanel(); } @@ -528,7 +529,7 @@ public class DirDiffPanel implements Disposable, DataProvider { } public void setupSplitter() { - mySplitPanel.setDividerLocation(Integer.valueOf(PropertiesComponent.getInstance().getValue(DIVIDER_PROPERTY, "200"))); + mySplitPanel.setDividerLocation(Integer.valueOf(PropertiesComponent.getInstance().getInt(DIVIDER_PROPERTY, DIVIDER_PROPERTY_DEFAULT_VALUE))); } @Override diff --git a/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/actions/popup/WarnOnDeletion.java b/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/actions/popup/WarnOnDeletion.java index c17f44cec88e..687151e9aecb 100644 --- a/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/actions/popup/WarnOnDeletion.java +++ b/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/actions/popup/WarnOnDeletion.java @@ -37,10 +37,10 @@ public class WarnOnDeletion extends ToggleAction implements DumbAware { } public static boolean isWarnWhenDeleteItems() { - return !PropertiesComponent.getInstance().isTrueValue(PROPERTY_NAME); + return PropertiesComponent.getInstance().getBoolean(PROPERTY_NAME, false); } public static void setWarnWhenDeleteItems(boolean warn) { - PropertiesComponent.getInstance().setValue(PROPERTY_NAME, Boolean.valueOf(!warn).toString()); + PropertiesComponent.getInstance().setValue(PROPERTY_NAME, warn); } } diff --git a/plugins/devkit/src/dom/generator/DomGenPanel.java b/plugins/devkit/src/dom/generator/DomGenPanel.java index eaa90acf9e39..7d5229c9e64c 100644 --- a/plugins/devkit/src/dom/generator/DomGenPanel.java +++ b/plugins/devkit/src/dom/generator/DomGenPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -135,7 +135,7 @@ public class DomGenPanel { } private static String getValue(String name, String defaultValue) { - return PropertiesComponent.getInstance().getOrInit(PREFIX + name, defaultValue); + return PropertiesComponent.getInstance().getValue(PREFIX + name, defaultValue); } private static void setValue(String name, String value) { diff --git a/plugins/editorconfig/src/org/editorconfig/plugincomponents/EditorConfigNotifierProvider.java b/plugins/editorconfig/src/org/editorconfig/plugincomponents/EditorConfigNotifierProvider.java index eaabd09fee5d..6ef0c1733b59 100644 --- a/plugins/editorconfig/src/org/editorconfig/plugincomponents/EditorConfigNotifierProvider.java +++ b/plugins/editorconfig/src/org/editorconfig/plugincomponents/EditorConfigNotifierProvider.java @@ -53,7 +53,7 @@ public class EditorConfigNotifierProvider extends EditorNotifications.Provider