Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
7319b281
Commit
7319b281
authored
6 years ago
by
Dmitry.Krasilschikov
Browse files
Options
Download
Email Patches
Plain Diff
IDEA-200666 IDEA-205681 move list size settings from Registry to General | Editor | Limits group
parent
3a3e0fd2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.kt
+3
-0
platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.kt
platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsState.kt
+3
-0
.../editor-ui-api/src/com/intellij/ide/ui/UISettingsState.kt
platform/lang-impl/src/com/intellij/application/options/editor/EditorOptionsPanel.form
+17
-1
...tellij/application/options/editor/EditorOptionsPanel.form
platform/lang-impl/src/com/intellij/application/options/editor/EditorOptionsPanel.java
+23
-1
...tellij/application/options/editor/EditorOptionsPanel.java
platform/platform-impl/src/com/intellij/ide/actions/RecentLocationManager.java
+2
-2
...l/src/com/intellij/ide/actions/RecentLocationManager.java
platform/platform-impl/src/com/intellij/ide/actions/RecentLocationsAction.java
+2
-8
...l/src/com/intellij/ide/actions/RecentLocationsAction.java
platform/platform-resources-en/src/messages/ApplicationBundle.properties
+1
-0
...rm-resources-en/src/messages/ApplicationBundle.properties
platform/util/resources/misc/registry.properties
+0
-3
platform/util/resources/misc/registry.properties
with
51 additions
and
15 deletions
+51
-15
platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.kt
+
3
-
0
View file @
7319b281
...
...
@@ -251,6 +251,9 @@ class UISettings @JvmOverloads constructor(private val notRoamableOptions: NotRo
val
recentFilesLimit
:
Int
get
()
=
state
.
recentFilesLimit
val
recentLocationsLimit
:
Int
get
()
=
state
.
recentLocationsLimit
var
maxLookupWidth
:
Int
get
()
=
state
.
maxLookupWidth
set
(
value
)
{
...
...
This diff is collapsed.
Click to expand it.
platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsState.kt
+
3
-
0
View file @
7319b281
...
...
@@ -37,6 +37,9 @@ class UISettingsState : BaseState() {
@
get
:
OptionTag
(
"RECENT_FILES_LIMIT"
)
var
recentFilesLimit
by
property
(
50
)
@
get
:
OptionTag
(
"RECENT_LOCATIONS_LIMIT"
)
var
recentLocationsLimit
by
property
(
10
)
@
get
:
OptionTag
(
"CONSOLE_COMMAND_HISTORY_LIMIT"
)
var
consoleCommandHistoryLimit
by
property
(
300
)
@
get
:
OptionTag
(
"OVERRIDE_CONSOLE_CYCLE_BUFFER_SIZE"
)
...
...
This diff is collapsed.
Click to expand it.
platform/lang-impl/src/com/intellij/application/options/editor/EditorOptionsPanel.form
+
17
-
1
View file @
7319b281
...
...
@@ -100,7 +100,7 @@
</component>
</children>
</grid>
<grid
id=
"7fdc1"
layout-manager=
"GridLayoutManager"
row-count=
"
2
"
column-count=
"2"
same-size-horizontally=
"false"
same-size-vertically=
"false"
hgap=
"-1"
vgap=
"-1"
>
<grid
id=
"7fdc1"
layout-manager=
"GridLayoutManager"
row-count=
"
3
"
column-count=
"2"
same-size-horizontally=
"false"
same-size-vertically=
"false"
hgap=
"-1"
vgap=
"-1"
>
<margin
top=
"0"
left=
"0"
bottom=
"0"
right=
"0"
/>
<constraints>
<grid
row=
"10"
column=
"0"
row-span=
"1"
col-span=
"1"
vsize-policy=
"3"
hsize-policy=
"3"
anchor=
"0"
fill=
"3"
indent=
"0"
use-parent-layout=
"false"
/>
...
...
@@ -143,6 +143,22 @@
<text
value=
"10"
/>
</properties>
</component>
<component
id=
"7b2ca"
class=
"javax.swing.JLabel"
>
<constraints>
<grid
row=
"2"
column=
"0"
row-span=
"1"
col-span=
"1"
vsize-policy=
"0"
hsize-policy=
"0"
anchor=
"8"
fill=
"0"
indent=
"0"
use-parent-layout=
"false"
/>
</constraints>
<properties>
<text
resource-bundle=
"messages/ApplicationBundle"
key=
"editbox.recent.locations.limit"
/>
</properties>
</component>
<component
id=
"3075f"
class=
"javax.swing.JTextField"
binding=
"myRecentLocationsLimitField"
>
<constraints>
<grid
row=
"2"
column=
"1"
row-span=
"1"
col-span=
"1"
vsize-policy=
"0"
hsize-policy=
"0"
anchor=
"8"
fill=
"0"
indent=
"0"
use-parent-layout=
"false"
/>
</constraints>
<properties>
<text
value=
"10"
/>
</properties>
</component>
</children>
</grid>
<grid
id=
"5df80"
binding=
"myHighlightSettingsPanel"
layout-manager=
"GridLayoutManager"
row-count=
"1"
column-count=
"1"
same-size-horizontally=
"false"
same-size-vertically=
"false"
hgap=
"-1"
vgap=
"-1"
>
...
...
This diff is collapsed.
Click to expand it.
platform/lang-impl/src/com/intellij/application/options/editor/EditorOptionsPanel.java
+
23
-
1
View file @
7319b281
...
...
@@ -96,10 +96,12 @@ public class EditorOptionsPanel extends CompositeConfigurable<ErrorOptionsProvid
private
JCheckBox
myCbEnableRichCopyByDefault
;
private
JCheckBox
myShowLSTInGutterCheckBox
;
private
JCheckBox
myShowWhitespacesModificationsInLSTGutterCheckBox
;
private
JCheckBox
myCbKeepTrailingSpacesOnCaretLine
;
private
JCheckBox
myCbKeepTrailingSpacesOnCaretLine
;
private
JTextField
myRecentLocationsLimitField
;
private
static
final
String
ACTIVE_COLOR_SCHEME
=
ApplicationBundle
.
message
(
"combobox.richcopy.color.scheme.active"
);
private
static
final
UINumericRange
RECENT_FILES_RANGE
=
new
UINumericRange
(
50
,
1
,
500
);
private
static
final
UINumericRange
RECENT_LOCATIONS_RANGE
=
new
UINumericRange
(
10
,
1
,
100
);
private
final
ErrorHighlightingPanel
myErrorHighlightingPanel
=
new
ErrorHighlightingPanel
(
getConfigurables
());
...
...
@@ -208,6 +210,7 @@ public class EditorOptionsPanel extends CompositeConfigurable<ErrorOptionsProvid
myRecentFilesLimitField
.
setText
(
Integer
.
toString
(
uiSettings
.
getRecentFilesLimit
()));
myRecentLocationsLimitField
.
setText
(
Integer
.
toString
(
uiSettings
.
getRecentLocationsLimit
()));
myCbRenameLocalVariablesInplace
.
setSelected
(
editorSettings
.
isVariableInplaceRenameEnabled
());
myPreselectCheckBox
.
setSelected
(
editorSettings
.
isPreselectRename
());
...
...
@@ -349,6 +352,11 @@ public class EditorOptionsPanel extends CompositeConfigurable<ErrorOptionsProvid
uiSettings
.
fireUISettingsChanged
();
}
uiSettingsChanged
=
setRecentLocationLimit
(
uiSettings
,
myRecentLocationsLimitField
.
getText
())
||
uiSettingsChanged
;
if
(
uiSettingsChanged
)
{
uiSettings
.
fireUISettingsChanged
();
}
myErrorHighlightingPanel
.
apply
();
super
.
apply
();
UISettings
.
getInstance
().
fireUISettingsChanged
();
...
...
@@ -364,6 +372,19 @@ public class EditorOptionsPanel extends CompositeConfigurable<ErrorOptionsProvid
ApplicationManager
.
getApplication
().
getMessageBus
().
syncPublisher
(
EditorOptionsListener
.
OPTIONS_PANEL_TOPIC
).
changesApplied
();
}
private
static
boolean
setRecentLocationLimit
(
@NotNull
UISettings
uiSettings
,
@NotNull
String
recentLocationsLimit
)
{
try
{
int
newRecentLocationsLimit
=
Integer
.
parseInt
(
recentLocationsLimit
.
trim
());
if
(
uiSettings
.
getRecentLocationsLimit
()
!=
newRecentLocationsLimit
)
{
uiSettings
.
getState
().
setRecentLocationsLimit
(
newRecentLocationsLimit
);
return
true
;
}
}
catch
(
NumberFormatException
ignored
)
{
}
return
false
;
}
private
int
getQuickDocDelayFromGui
()
{
try
{
return
EditorSettingsExternalizable
.
QUICK_DOC_DELAY_RANGE
.
fit
(
Integer
.
parseInt
(
myQuickDocDelayTextField
.
getText
().
trim
()));
...
...
@@ -461,6 +482,7 @@ public class EditorOptionsPanel extends CompositeConfigurable<ErrorOptionsProvid
isModified
|=
isModified
(
myRecentFilesLimitField
,
UISettings
.
getInstance
().
getRecentFilesLimit
(),
RECENT_FILES_RANGE
);
isModified
|=
isModified
(
myRecentLocationsLimitField
,
UISettings
.
getInstance
().
getRecentLocationsLimit
(),
RECENT_LOCATIONS_RANGE
);
isModified
|=
isModified
(
myCbRenameLocalVariablesInplace
,
editorSettings
.
isVariableInplaceRenameEnabled
());
isModified
|=
isModified
(
myPreselectCheckBox
,
editorSettings
.
isPreselectRename
());
isModified
|=
isModified
(
myShowInlineDialogForCheckBox
,
editorSettings
.
isShowInlineLocalDialog
());
...
...
This diff is collapsed.
Click to expand it.
platform/platform-impl/src/com/intellij/ide/actions/RecentLocationManager.java
+
2
-
2
View file @
7319b281
...
...
@@ -2,6 +2,7 @@
package
com.intellij.ide.actions
;
import
com.intellij.codeInsight.breadcrumbs.FileBreadcrumbsCollector
;
import
com.intellij.ide.ui.UISettings
;
import
com.intellij.openapi.components.ProjectComponent
;
import
com.intellij.openapi.editor.Editor
;
import
com.intellij.openapi.editor.LogicalPosition
;
...
...
@@ -19,7 +20,6 @@ import com.intellij.openapi.fileEditor.impl.IdeDocumentHistoryImpl.PlaceInfo;
import
com.intellij.openapi.fileEditor.impl.text.TextEditorState
;
import
com.intellij.openapi.progress.util.ProgressIndicatorBase
;
import
com.intellij.openapi.project.Project
;
import
com.intellij.openapi.util.registry.Registry
;
import
com.intellij.openapi.vfs.VirtualFileManager
;
import
com.intellij.openapi.vfs.newvfs.BulkFileListener
;
import
com.intellij.openapi.vfs.newvfs.events.VFileEvent
;
...
...
@@ -243,7 +243,7 @@ public class RecentLocationManager implements ProjectComponent {
private
static
class
RecentLocationFixedSizeHashMap
extends
LinkedHashMap
<
PlaceInfo
,
PlaceInfoPersistentItem
>
{
@Override
protected
boolean
removeEldestEntry
(
Map
.
Entry
<
PlaceInfo
,
PlaceInfoPersistentItem
>
eldest
)
{
return
size
()
>
Registry
.
intValue
(
"r
ecent
.l
ocations
.list.size"
,
10
);
return
size
()
>
UISettings
.
getInstance
().
getR
ecent
L
ocations
Limit
(
);
}
}
}
This diff is collapsed.
Click to expand it.
platform/platform-impl/src/com/intellij/ide/actions/RecentLocationsAction.java
+
2
-
8
View file @
7319b281
...
...
@@ -333,15 +333,9 @@ public class RecentLocationsAction extends AnAction {
List
<
RecentLocationItem
>
caretsList
=
ContainerUtil
.
newArrayList
();
for
(
PlaceInfo
placeInfo
:
places
)
{
EditorEx
editor
=
createEditor
(
project
,
placeInfo
);
if
(
editor
=
=
null
)
{
c
ontinue
;
if
(
editor
!
=
null
)
{
c
aretsList
.
add
(
new
RecentLocationItem
(
editor
,
placeInfo
))
;
}
if
(
caretsList
.
size
()
>
Registry
.
intValue
(
"recent.locations.list.size"
,
10
)
-
1
)
{
break
;
}
caretsList
.
add
(
new
RecentLocationItem
(
editor
,
placeInfo
));
}
return
caretsList
;
...
...
This diff is collapsed.
Click to expand it.
platform/platform-resources-en/src/messages/ApplicationBundle.properties
+
1
-
0
View file @
7319b281
...
...
@@ -447,6 +447,7 @@ combobox.strip.trailing.spaces.on.save=Strip trailing spaces on Save:
checkbox.show.quick.doc.on.mouse.over
=
Show quick doc on mouse over element (ms):
group.limits
=
Limits
editbox.recent.files.limit
=
Recent files limit:
editbox.recent.locations.limit
=
Recent locations limit:
editbox.console.history.limit
=
Console commands history size:
checkbox.override.console.cycle.buffer.size
=
Override console cycle buffer size ({0} KB)
checkbox.override.console.cycle.buffer.size.warning.unlimited
=
Warning: unlimited buffer size can cause performance degradation
...
...
This diff is collapsed.
Click to expand it.
platform/util/resources/misc/registry.properties
+
0
-
3
View file @
7319b281
...
...
@@ -1785,11 +1785,8 @@ ide.system.tray.enabled.description=Enables notifications via SystemTray
idea.profiler.jvm.dtrace
=
false
idea.profiler.jvm.dtrace.description
=
Enable JVM DTrace based profiler on Mac OS
recent.locations.list.size
=
10
recent.locations.list.size.description
=
Recent locations list size
recent.locations.lines.before.and.after
=
2
recent.locations.lines.before.and.after.description
=
Defines lines count that are shown before and after recent location.
uast.java.use.psi.type.precheck
=
true
uast.java.use.psi.type.precheck.description
=
Enable Java Uast performance optimisation which will check in advance if PsiElement converting is possible
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help