IDEA-134720 Reorganize UI for editor soft wraps settings - fixed exception

This commit is contained in:
Dmitry Batrak
2014-12-26 17:04:56 +03:00
parent a108ed43da
commit 349efe6c0e
2 changed files with 15 additions and 2 deletions
@@ -16,6 +16,7 @@
package com.intellij.ide.ui;
import com.intellij.ide.ui.search.BooleanOptionDescription;
import com.intellij.openapi.editor.ex.EditorSettingsExternalizable;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.util.containers.ContainerUtil;
@@ -37,7 +38,18 @@ public class EditorOptionsTopHitProvider extends OptionsTopHitProvider {
? "checkbox.enable.ctrl.mousewheel.changes.font.size.macos"
: "checkbox.enable.ctrl.mousewheel.changes.font.size"), "IS_WHEEL_FONTCHANGE_ENABLED"),
editor("Mouse: " + messageApp("checkbox.enable.drag.n.drop.functionality.in.editor"), "IS_DND_ENABLED"),
editor("Virtual Space: " + messageApp("checkbox.show.all.softwraps"), "IS_ALL_SOFTWRAPS_SHOWN"),
new EditorOptionDescription(null, messageApp("checkbox.show.softwraps.only.for.caret.line.action.text"), "preferences.editor") {
@Override
public boolean isOptionEnabled() {
return !EditorSettingsExternalizable.getInstance().isAllSoftWrapsShown();
}
@Override
public void setOptionState(boolean enabled) {
EditorSettingsExternalizable.getInstance().setAllSoftwrapsShown(!enabled);
fireUpdated();
}
},
editor("Virtual Space: " + messageApp("checkbox.allow.placement.of.caret.after.end.of.line"), "IS_VIRTUAL_SPACE"),
editor("Virtual Space: " + messageApp("checkbox.allow.placement.of.caret.inside.tabs"), "IS_CARET_INSIDE_TABS"),
editor("Virtual Space: " + messageApp("checkbox.show.virtual.space.at.file.bottom"), "ADDITIONAL_PAGE_AT_BOTTOM"),
@@ -390,7 +390,8 @@ group.soft.wraps=Soft Wraps
checkbox.use.soft.wraps.at.editor=Use soft wraps in editor
checkbox.use.soft.wraps.at.console=Use soft wraps in console
checkbox.use.custom.soft.wraps.indent=Use original line's indent for wrapped parts. Additional shift:
checkbox.show.softwraps.only.for.caret.line=Show soft wrap symbols only for current line
checkbox.show.softwraps.only.for.caret.line=Show soft wraps for current line only
checkbox.show.softwraps.only.for.caret.line.action.text=Soft Wraps: Show for current line only
group.virtual.space=Virtual Space
checkbox.allow.placement.of.caret.after.end.of.line=Allow placement of caret after end of line
checkbox.allow.placement.of.caret.inside.tabs=Allow placement of caret inside tabs