mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[pycharm] PY-84635 Jupyter: add expand / collapse actions directly to the header panel
Merge-request: IJ-MR-182412 Merged-by: Ekaterina Itsenko <ekaterina.itsenko@jetbrains.com> GitOrigin-RevId: d2870f328b5988d60ba6885ec325e9668b757b6b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
326a720f9f
commit
4be94e994b
@@ -563,7 +563,13 @@ class StructureViewWrapperImpl(
|
||||
val titleActions: List<AnAction> = if (structureView is StructureViewComponent) {
|
||||
if (ExperimentalUI.isNewUI()) {
|
||||
readAction { structureView.getViewActions(myActionGroup) }
|
||||
listOf(myActionGroup)
|
||||
val headerActions = withContext(Dispatchers.EDT) { structureView.headerActions }
|
||||
if (headerActions.isNotEmpty()) {
|
||||
listOf(myActionGroup, Separator.getInstance()) + headerActions
|
||||
}
|
||||
else {
|
||||
listOf(myActionGroup)
|
||||
}
|
||||
}
|
||||
else {
|
||||
withContext(Dispatchers.EDT) { structureView.addExpandCollapseActions() }
|
||||
|
||||
+5
-1
@@ -377,7 +377,7 @@ public class StructureViewComponent extends SimpleToolWindowPanel implements Tre
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public final void getViewActions(@NotNull DefaultActionGroup result) {
|
||||
public void getViewActions(@NotNull DefaultActionGroup result) {
|
||||
result.addSeparator(StructureViewBundle.message("structureview.subgroup.sort"));
|
||||
result.addAll(sortActionsByName(getSortActions()));
|
||||
result.addSeparator(StructureViewBundle.message("structureview.subgroup.filter"));
|
||||
@@ -429,6 +429,10 @@ public class StructureViewComponent extends SimpleToolWindowPanel implements Tre
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public @NotNull List<AnAction> getHeaderActions() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
protected void addGroupByActions(@NotNull DefaultActionGroup result) {
|
||||
Grouper[] groupers = myTreeModel.getGroupers();
|
||||
|
||||
Reference in New Issue
Block a user