diff --git a/platform/configuration-store-impl/src/ProjectStoreImpl.kt b/platform/configuration-store-impl/src/ProjectStoreImpl.kt index 3dd08c9e91b3..227f124482b9 100644 --- a/platform/configuration-store-impl/src/ProjectStoreImpl.kt +++ b/platform/configuration-store-impl/src/ProjectStoreImpl.kt @@ -294,7 +294,7 @@ private open class ProjectStoreImpl(project: ProjectImpl, private val pathMacroM val nameFile = nameFile if (nameFile.exists()) { try { - nameFile.inputStream().reader().useLines() { it.firstOrNull { !it.isEmpty() }?.trim() }?.let { + nameFile.inputStream().reader().useLines { it.firstOrNull { !it.isEmpty() }?.trim() }?.let { lastSavedProjectName = it return it } diff --git a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsEditor.java b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsEditor.java index 46b03ed48625..fcc4cffac60d 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsEditor.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsEditor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -51,6 +51,7 @@ import java.util.Map; final class SettingsEditor extends AbstractEditor implements DataProvider { private static final String SELECTED_CONFIGURABLE = "settings.editor.selected.configurable"; private static final String SPLITTER_PROPORTION = "settings.editor.splitter.proportion"; + private static final float SPLITTER_PROPORTION_DEFAULT_VALUE = .2f; private final PropertiesComponent myProperties; private final Settings mySettings; @@ -209,11 +210,12 @@ final class SettingsEditor extends AbstractEditor implements DataProvider { JComponent right = new JPanel(new BorderLayout()); right.add(BorderLayout.NORTH, myBanner); right.add(BorderLayout.CENTER, myLoadingDecorator.getComponent()); - mySplitter = new OnePixelSplitter(false, myProperties.getFloat(SPLITTER_PROPORTION, .2f)); + mySplitter = new OnePixelSplitter(false, myProperties.getFloat(SPLITTER_PROPORTION, SPLITTER_PROPORTION_DEFAULT_VALUE)); mySplitter.setHonorComponentsMinimumSize(true); mySplitter.setFirstComponent(left); mySplitter.setSecondComponent(right); mySpotlightPainter = new SpotlightPainter(myEditor, this) { + @Override void updateNow() { Configurable configurable = myFilter.myContext.getCurrentConfigurable(); if (myTreeView.myTree.hasFocus() || mySearch.getTextEditor().hasFocus()) { @@ -275,7 +277,7 @@ final class SettingsEditor extends AbstractEditor implements DataProvider { @Override void disposeOnce() { - myProperties.setValue(SPLITTER_PROPORTION, Float.toString(mySplitter.getProportion())); + myProperties.setValue(SPLITTER_PROPORTION, mySplitter.getProportion(), SPLITTER_PROPORTION_DEFAULT_VALUE); } @Override