Search in sources :

Example 1 with IpnbCodeSourcePanel

use of org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodeSourcePanel 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());
}
Also used : IpnbFilePanel(org.jetbrains.plugins.ipnb.editor.panels.IpnbFilePanel) IpnbCodeSourcePanel(org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodeSourcePanel) IpnbFileEditor(org.jetbrains.plugins.ipnb.editor.IpnbFileEditor) Editor(com.intellij.openapi.editor.Editor) IpnbFileEditor(org.jetbrains.plugins.ipnb.editor.IpnbFileEditor) IpnbCodePanel(org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodePanel)

Example 2 with IpnbCodeSourcePanel

use of org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodeSourcePanel 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());
}
Also used : IpnbFilePanel(org.jetbrains.plugins.ipnb.editor.panels.IpnbFilePanel) IpnbCodeSourcePanel(org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodeSourcePanel) IpnbFileEditor(org.jetbrains.plugins.ipnb.editor.IpnbFileEditor) Editor(com.intellij.openapi.editor.Editor) IpnbFileEditor(org.jetbrains.plugins.ipnb.editor.IpnbFileEditor) IpnbCodePanel(org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodePanel)

Aggregations

Editor (com.intellij.openapi.editor.Editor)2 IpnbFileEditor (org.jetbrains.plugins.ipnb.editor.IpnbFileEditor)2 IpnbFilePanel (org.jetbrains.plugins.ipnb.editor.panels.IpnbFilePanel)2 IpnbCodePanel (org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodePanel)2 IpnbCodeSourcePanel (org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodeSourcePanel)2