mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Jupyter Notebook: clear finish execution action before run cell
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ public class IpnbRunAllCellsAction extends IpnbRunCellBaseAction {
|
||||
final int nextIndex = i + 1;
|
||||
if (nextIndex < cells.size()) {
|
||||
final IpnbEditablePanel nextCell = cells.get(nextIndex);
|
||||
cell.setupOnFinish(() -> nextCell.runCell(nextIndex != cells.size() - 1));
|
||||
cell.onFinishExecutionAction(() -> nextCell.runCell(nextIndex != cells.size() - 1));
|
||||
}
|
||||
}
|
||||
final IpnbEditablePanel firstPanel = cells.get(0);
|
||||
|
||||
@@ -15,6 +15,7 @@ public abstract class IpnbRunCellBaseAction extends AnAction {
|
||||
public static void runCell(@NotNull final IpnbFilePanel ipnbFilePanel, boolean selectNext) {
|
||||
final IpnbEditablePanel cell = ipnbFilePanel.getSelectedCellPanel();
|
||||
if (cell == null) return;
|
||||
cell.onFinishExecutionAction(null);
|
||||
cell.runCell(selectNext);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ public abstract class IpnbEditablePanel<T extends JComponent, K extends IpnbEdit
|
||||
|
||||
protected String getRawCellText() { return ""; }
|
||||
|
||||
public void setupOnFinish(Runnable onFinish) {
|
||||
public void onFinishExecutionAction(Runnable onFinish) {
|
||||
myOnFinish = onFinish;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user