Search in sources :

Example 26 with IpnbFileEditor

use of org.jetbrains.plugins.ipnb.editor.IpnbFileEditor in project intellij-community by JetBrains.

the class IpnbMarkdownCellAction 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) {
        changeTypeToMarkdown((IpnbFileEditor) editor);
    }
}
Also used : DataContext(com.intellij.openapi.actionSystem.DataContext) FileEditor(com.intellij.openapi.fileEditor.FileEditor) IpnbFileEditor(org.jetbrains.plugins.ipnb.editor.IpnbFileEditor) IpnbFileEditor(org.jetbrains.plugins.ipnb.editor.IpnbFileEditor)

Example 27 with IpnbFileEditor

use of org.jetbrains.plugins.ipnb.editor.IpnbFileEditor in project intellij-community by JetBrains.

the class IpnbReloadKernelAction 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) {
        reloadKernel(((IpnbFileEditor) editor));
    }
}
Also used : DataContext(com.intellij.openapi.actionSystem.DataContext) FileEditor(com.intellij.openapi.fileEditor.FileEditor) IpnbFileEditor(org.jetbrains.plugins.ipnb.editor.IpnbFileEditor) IpnbFileEditor(org.jetbrains.plugins.ipnb.editor.IpnbFileEditor)

Aggregations

IpnbFileEditor (org.jetbrains.plugins.ipnb.editor.IpnbFileEditor)27 DataContext (com.intellij.openapi.actionSystem.DataContext)23 IpnbFilePanel (org.jetbrains.plugins.ipnb.editor.panels.IpnbFilePanel)19 FileEditor (com.intellij.openapi.fileEditor.FileEditor)14 IpnbEditablePanel (org.jetbrains.plugins.ipnb.editor.panels.IpnbEditablePanel)3 Editor (com.intellij.openapi.editor.Editor)2 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 IpnbCodePanel (org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodePanel)2 IpnbCodeSourcePanel (org.jetbrains.plugins.ipnb.editor.panels.code.IpnbCodeSourcePanel)2 Disposable (com.intellij.openapi.Disposable)1 CustomShortcutSet (com.intellij.openapi.actionSystem.CustomShortcutSet)1 Presentation (com.intellij.openapi.actionSystem.Presentation)1 EditorMouseAdapter (com.intellij.openapi.editor.event.EditorMouseAdapter)1 EditorMouseEvent (com.intellij.openapi.editor.event.EditorMouseEvent)1 Project (com.intellij.openapi.project.Project)1 IpnbConnectionManager (org.jetbrains.plugins.ipnb.configuration.IpnbConnectionManager)1 IpnbConnection (org.jetbrains.plugins.ipnb.protocol.IpnbConnection)1