<commit_before>package org.jetbrains.plugins.ipnb.editor.actions;

import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.fileEditor.FileEditor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.ipnb.editor.IpnbFileEditor;
import org.jetbrains.plugins.ipnb.editor.panels.IpnbFilePanel;
import org.jetbrains.plugins.ipnb.editor.panels.IpnbPanel;

public class IpnbRunCellAction extends AnAction {
  public IpnbRunCellAction() {
    super(AllIcons.General.Run);
  }

  @Override
  public void actionPerformed(AnActionEvent event) {
    final DataContext context = event.getDataContext();
    final FileEditor editor = PlatformDataKeys.FILE_EDITOR.getData(context);
    if (editor instanceof IpnbFileEditor) {
      final IpnbFilePanel component = ((IpnbFileEditor)editor).getIpnbEditorPanel();
      runCell(component);
    }
  }

  public void runCell(@NotNull final IpnbFilePanel ipnbFilePanel) {
    final IpnbPanel cell = ipnbFilePanel.getSelectedCell();
    cell.runCell();
    ipnbFilePanel.selectNext(cell);
    ipnbFilePanel.repaint();
    cell.requestFocus();
  }
}<commit_msg>proper select next after cell run action<commit_after>package org.jetbrains.plugins.ipnb.editor.actions;

import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.fileEditor.FileEditor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.ipnb.editor.IpnbFileEditor;
import org.jetbrains.plugins.ipnb.editor.panels.IpnbFilePanel;
import org.jetbrains.plugins.ipnb.editor.panels.IpnbPanel;

public class IpnbRunCellAction extends AnAction {
  public IpnbRunCellAction() {
    super(AllIcons.General.Run);
  }

  @Override
  public void actionPerformed(AnActionEvent event) {
    final DataContext context = event.getDataContext();
    final FileEditor editor = PlatformDataKeys.FILE_EDITOR.getData(context);
    if (editor instanceof IpnbFileEditor) {
      final IpnbFilePanel component = ((IpnbFileEditor)editor).getIpnbEditorPanel();
      runCell(component);
    }
  }

  public void runCell(@NotNull final IpnbFilePanel ipnbFilePanel) {
    final IpnbPanel cell = ipnbFilePanel.getSelectedCell();
    cell.runCell();
    ipnbFilePanel.selectNext(cell);
    ipnbFilePanel.repaint();
  }
}
{'fraction_non_alphanumeric': 0.09662921348314607, 'fraction_numerical': 0.0, 'mean_word_length': 5.405275779376499, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4556162', 'n_tokens_mistral': 849, 'n_tokens_neox': 836, 'n_words': 137}