if (selectionText != null) {
sendCommand = sendCommand.withSelectionText(selectionText);
}
else {
PyFile file = getPythonFile(e);
if (file != null) {
sendCommand = sendCommand.withFile(file.getVirtualFile());
}
else {
throw new IllegalStateException();
}
}