mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SettingsImpl cleanup
This commit is contained in:
@@ -345,7 +345,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
myScrollPane = new MyScrollPane(); // create UI after scheme initialization
|
||||
myIsViewer = viewer;
|
||||
myKind = kind;
|
||||
mySettings = new SettingsImpl(this, project, kind);
|
||||
mySettings = new SettingsImpl(this, kind);
|
||||
if (!mySettings.isUseSoftWraps() && shouldSoftWrapsBeForced()) {
|
||||
mySettings.setUseSoftWrapsQuiet();
|
||||
putUserData(FORCED_SOFT_WRAPS, Boolean.TRUE);
|
||||
|
||||
@@ -34,7 +34,7 @@ public class SettingsImpl implements EditorSettings {
|
||||
private Boolean myIsCamelWords;
|
||||
|
||||
// This group of settings does not have UI
|
||||
private SoftWrapAppliancePlaces mySoftWrapAppliancePlace = SoftWrapAppliancePlaces.MAIN_EDITOR;
|
||||
private final SoftWrapAppliancePlaces mySoftWrapAppliancePlace;
|
||||
private int myAdditionalLinesCount = Registry.intValue("editor.virtual.lines", 5);
|
||||
private int myAdditionalColumnsCount = 3;
|
||||
private int myLineCursorWidth = EditorUtil.getDefaultCaretWidth();
|
||||
@@ -83,10 +83,10 @@ public class SettingsImpl implements EditorSettings {
|
||||
private List<Integer> mySoftMargins = null;
|
||||
|
||||
public SettingsImpl() {
|
||||
this(null, null, null);
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
SettingsImpl(@Nullable EditorEx editor, @Nullable Project project, @Nullable EditorKind kind) {
|
||||
SettingsImpl(@Nullable EditorEx editor, @Nullable EditorKind kind) {
|
||||
myEditor = editor;
|
||||
if (EditorKind.CONSOLE.equals(kind)) {
|
||||
mySoftWrapAppliancePlace = SoftWrapAppliancePlaces.CONSOLE;
|
||||
@@ -94,6 +94,9 @@ public class SettingsImpl implements EditorSettings {
|
||||
else if (EditorKind.PREVIEW.equals(kind)) {
|
||||
mySoftWrapAppliancePlace = SoftWrapAppliancePlaces.PREVIEW;
|
||||
}
|
||||
else {
|
||||
mySoftWrapAppliancePlace = SoftWrapAppliancePlaces.MAIN_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user