Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
ae20525f
Commit
ae20525f
authored
6 years ago
by
Dmitry Batkovich
Browse files
Options
Download
Email Patches
Plain Diff
inspection settings: reload scope list after scope settings are edited
parent
d49b01df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platform/lang-impl/src/com/intellij/profile/codeInspection/ui/ScopesOrderDialog.java
+9
-7
...intellij/profile/codeInspection/ui/ScopesOrderDialog.java
with
9 additions
and
7 deletions
+9
-7
platform/lang-impl/src/com/intellij/profile/codeInspection/ui/ScopesOrderDialog.java
+
9
-
7
View file @
ae20525f
...
...
@@ -31,6 +31,7 @@ public class ScopesOrderDialog extends DialogWrapper {
private
final
InspectionProfileImpl
myInspectionProfile
;
private
final
Project
myProject
;
private
final
JPanel
myPanel
;
private
final
MyModel
myModel
;
public
ScopesOrderDialog
(
final
@NotNull
Component
parent
,
final
InspectionProfileImpl
inspectionProfile
,
...
...
@@ -38,8 +39,11 @@ public class ScopesOrderDialog extends DialogWrapper {
super
(
parent
,
true
);
myInspectionProfile
=
inspectionProfile
;
myProject
=
project
;
myModel
=
new
MyModel
();
reloadScopeList
();
myOptionsList
.
setModel
(
myModel
);
myOptionsList
.
setSelectedIndex
(
0
);
fillList
();
final
JPanel
listPanel
=
ToolbarDecorator
.
createDecorator
(
myOptionsList
).
setMoveDownAction
(
new
AnActionButtonRunnable
()
{
@Override
public
void
run
(
AnActionButton
anActionButton
)
{
...
...
@@ -54,6 +58,7 @@ public class ScopesOrderDialog extends DialogWrapper {
@Override
public
void
actionPerformed
(
AnActionEvent
e
)
{
ShowSettingsUtil
.
getInstance
().
editConfigurable
(
project
,
new
ScopeChooserConfigurable
(
project
));
reloadScopeList
();
}
}).
disableRemoveAction
().
disableAddAction
().
createPanel
();
final
JLabel
descr
=
new
JLabel
(
"<html><p>If file appears in two or more scopes, it will be "
+
...
...
@@ -68,9 +73,8 @@ public class ScopesOrderDialog extends DialogWrapper {
setTitle
(
"Scopes Order"
);
}
private
void
fillList
()
{
MyModel
model
=
new
MyModel
();
model
.
removeAllElements
();
private
void
reloadScopeList
()
{
myModel
.
removeAllElements
();
final
List
<
String
>
scopes
=
new
ArrayList
<>();
for
(
final
NamedScopesHolder
holder
:
NamedScopesHolder
.
getAllNamedScopeHolders
(
myProject
))
{
...
...
@@ -83,10 +87,8 @@ public class ScopesOrderDialog extends DialogWrapper {
scopes
.
remove
(
CustomScopesProviderEx
.
getAllScope
().
getName
());
Collections
.
sort
(
scopes
,
new
ScopeOrderComparator
(
myInspectionProfile
));
for
(
String
scopeName
:
scopes
)
{
model
.
addElement
(
scopeName
);
m
yM
odel
.
addElement
(
scopeName
);
}
myOptionsList
.
setModel
(
model
);
myOptionsList
.
setSelectedIndex
(
0
);
}
@Nullable
...
...
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