mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanp, do not save default settings.editor.splitter.proportion
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
+5
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user