mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
navigate between cells using keyboard
This commit is contained in:
@@ -2,6 +2,7 @@ package org.jetbrains.plugins.ipnb.editor.panels;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.actionSystem.DataProvider;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
@@ -35,7 +36,9 @@ import org.jetbrains.plugins.ipnb.format.cells.output.IpnbOutputCell;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -574,6 +577,11 @@ public class IpnbFilePanel extends JPanel implements Scrollable, DataProvider, D
|
||||
@Override
|
||||
public Object getData(String dataId) {
|
||||
final IpnbEditablePanel cell = getSelectedCell();
|
||||
if (CommonDataKeys.EDITOR.is(dataId)) {
|
||||
if (cell instanceof IpnbCodePanel) {
|
||||
return ((IpnbCodePanel)cell).getEditor();
|
||||
}
|
||||
}
|
||||
if (OpenFileDescriptor.NAVIGATE_IN_EDITOR.is(dataId)) {
|
||||
if (cell instanceof IpnbCodePanel) {
|
||||
return ((IpnbCodePanel)cell).getEditor();
|
||||
|
||||
Reference in New Issue
Block a user