use of org.jetbrains.plugins.ipnb.editor.IpnbFileEditor in project intellij-community by JetBrains.
the class IpnbPasteCellAction method actionPerformed.
@Override
public void actionPerformed(@NotNull AnActionEvent event) {
final DataContext context = event.getDataContext();
final FileEditor editor = PlatformDataKeys.FILE_EDITOR.getData(context);
if (editor instanceof IpnbFileEditor) {
final IpnbFilePanel component = ((IpnbFileEditor) editor).getIpnbFilePanel();
pasteCell(component);
}
}
use of org.jetbrains.plugins.ipnb.editor.IpnbFileEditor in project intellij-community by JetBrains.
the class IpnbPyFunction method navigate.
@Override
public void navigate(boolean requestFocus) {
final IpnbCodeSourcePanel sourcePanel = ((IpnbPyFragment) getContainingFile()).getCodeSourcePanel();
final Editor editor = sourcePanel.getEditor();
final IpnbCodePanel codePanel = sourcePanel.getIpnbCodePanel();
final IpnbFileEditor fileEditor = codePanel.getFileEditor();
final IpnbFilePanel filePanel = fileEditor.getIpnbFilePanel();
codePanel.setEditing(true);
filePanel.setSelectedCellPanel(codePanel);
super.navigate(false);
UIUtil.requestFocus(editor.getContentComponent());
}
use of org.jetbrains.plugins.ipnb.editor.IpnbFileEditor in project intellij-community by JetBrains.
the class IpnbPyTargetExpression method navigate.
@Override
public void navigate(boolean requestFocus) {
final IpnbCodeSourcePanel sourcePanel = ((IpnbPyFragment) getContainingFile()).getCodeSourcePanel();
final Editor editor = sourcePanel.getEditor();
final IpnbCodePanel codePanel = sourcePanel.getIpnbCodePanel();
final IpnbFileEditor fileEditor = codePanel.getFileEditor();
final IpnbFilePanel filePanel = fileEditor.getIpnbFilePanel();
codePanel.setEditing(true);
filePanel.setSelectedCellPanel(codePanel);
super.navigate(false);
UIUtil.requestFocus(editor.getContentComponent());
}
use of org.jetbrains.plugins.ipnb.editor.IpnbFileEditor in project intellij-community by JetBrains.
the class IpnbRunCellAction method actionPerformed.
@Override
public void actionPerformed(@NotNull AnActionEvent event) {
final DataContext context = event.getDataContext();
final IpnbFileEditor ipnbEditor = IpnbFileEditor.DATA_KEY.getData(context);
if (ipnbEditor != null) {
final IpnbFilePanel component = ipnbEditor.getIpnbFilePanel();
runCell(component, true);
}
}
use of org.jetbrains.plugins.ipnb.editor.IpnbFileEditor in project intellij-community by JetBrains.
the class IpnbAddCellBelowAction method actionPerformed.
@Override
public void actionPerformed(@NotNull AnActionEvent event) {
final DataContext context = event.getDataContext();
final FileEditor editor = PlatformDataKeys.FILE_EDITOR.getData(context);
if (editor instanceof IpnbFileEditor) {
final IpnbFilePanel component = ((IpnbFileEditor) editor).getIpnbFilePanel();
addCell(component);
}
}
Aggregations