void () { String validation = validateInterpreterForm(); if (validation != null) { onCreateFail(validation); return; } T remoteSdkData; try { remoteSdkData = getInterpreterForm().createSdkData(); } catch (ProcessCanceledException ignored) { return; } catch (RemoteSdkException e) { LOG.warn("Failed to create SDK data", e); onCreateFail(e.getMessage()); return; } if (!validateRemoteSdkData(remoteSdkData)) { LOG.info("Validation of SDK Data failed"); return; } try { mySdk = createSdk(remoteSdkData); SdkAdditionalData newData = mySdk.getSdkAdditionalData(); assert newData instanceof RemoteSdkAdditionalData; //noinspection unchecked if (((RemoteSdkAdditionalData<?>)newData).isValid() && (myOriginalData == null || !myOriginalData.isValid() || (myOriginalData.getClass().isInstance(newData) && isModified(myOriginalData, (T)newData))) ) { // we initialize sdk only if it is valid initSdk(mySdk); } } catch (RemoteSdkException e) { mySdk = null; if (!ExceptionUtil.causedBy(e, InterruptedException.class)) { LOG.debug("Failed to create remote SDK", e); onCreateFail(e.getMessage()); } return; } ApplicationManager.getApplication().invokeAndWait(() -> super.doOKAction()); }