mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed NPE on creating new Ipython notebook
This commit is contained in:
@@ -106,7 +106,17 @@ public class IpnbFilePanel extends JPanel implements Scrollable, DataProvider, D
|
||||
mySelectedCell = null;
|
||||
myIpnbFile = IpnbParser.parseIpnbFile(myDocument, myVirtualFile.getPath());
|
||||
if (myIpnbFile.getCells().isEmpty()) {
|
||||
createAndAddCell(true);
|
||||
CommandProcessor.getInstance().runUndoTransparentAction(new Runnable() {
|
||||
public void run() {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
public void run() {
|
||||
createAndAddCell(true);
|
||||
saveToFile();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
} catch (IOException e) {
|
||||
if (showError)
|
||||
|
||||
Reference in New Issue
Block a user