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
25f448bd
Commit
25f448bd
authored
8 years ago
by
Artem Bukhonov
Browse files
Options
Download
Email Patches
Plain Diff
New overload of ComboBoxAction.createPopupActionGroup() with dataContext parameter.
parent
05c1c3c2
Branches unavailable
Tags unavailable
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platform/platform-api/src/com/intellij/openapi/actionSystem/ex/ComboBoxAction.java
+7
-2
.../com/intellij/openapi/actionSystem/ex/ComboBoxAction.java
with
7 additions
and
2 deletions
+7
-2
platform/platform-api/src/com/intellij/openapi/actionSystem/ex/ComboBoxAction.java
+
7
-
2
View file @
25f448bd
...
...
@@ -77,7 +77,7 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
DataContext
context
=
e
.
getDataContext
();
Project
project
=
e
.
getProject
();
if
(
project
==
null
)
return
;
DefaultActionGroup
group
=
createPopupActionGroup
(
button
);
DefaultActionGroup
group
=
createPopupActionGroup
(
button
,
context
);
ListPopup
popup
=
JBPopupFactory
.
getInstance
().
createActionGroupPopup
(
myPopupTitle
,
group
,
context
,
false
,
shouldShowDisabledActions
(),
false
,
null
,
getMaxRows
(),
getPreselectCondition
());
popup
.
setMinimumSize
(
new
Dimension
(
getMinWidth
(),
getMinHeight
()));
...
...
@@ -121,6 +121,11 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
@NotNull
protected
abstract
DefaultActionGroup
createPopupActionGroup
(
JComponent
button
);
@NotNull
protected
DefaultActionGroup
createPopupActionGroup
(
JComponent
button
,
@NotNull
DataContext
dataContext
)
{
return
createPopupActionGroup
(
button
);
}
protected
int
getMaxRows
()
{
return
30
;
}
...
...
@@ -265,9 +270,9 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
}
protected
JBPopup
createPopup
(
Runnable
onDispose
)
{
DefaultActionGroup
group
=
createPopupActionGroup
(
this
);
DataContext
context
=
getDataContext
();
DefaultActionGroup
group
=
createPopupActionGroup
(
this
,
context
);
ListPopup
popup
=
JBPopupFactory
.
getInstance
().
createActionGroupPopup
(
myPopupTitle
,
group
,
context
,
false
,
shouldShowDisabledActions
(),
false
,
onDispose
,
getMaxRows
(),
getPreselectCondition
());
popup
.
setMinimumSize
(
new
Dimension
(
getMinWidth
(),
getMinHeight
()));
...
...
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