void () { if (myHandler.containsCustomEnvironmentVariable(GIT_EDITOR_ENV)) return; try { GitExecutable executable = myHandler.getExecutable(); UUID handlerId = myService.registerHandler(myEditorHandler, executable, myDisposable); int port = myService.getIdePort(); File scriptFile = myService.getCallbackScriptPath(executable.getId(), new GitScriptGenerator(executable), false); String scriptPath = executable.convertFilePath(scriptFile); myHandler.addCustomEnvironmentVariable(GIT_EDITOR_ENV, CommandLineUtil.posixQuote(scriptPath)); myHandler.addCustomEnvironmentVariable(GitRebaseEditorAppHandler.IJ_EDITOR_HANDLER_ENV, handlerId.toString()); myHandler.addCustomEnvironmentVariable(GitRebaseEditorAppHandler.IJ_EDITOR_PORT_ENV, Integer.toString(port)); } catch (IOException e) { LOG.error(e); } }