Source:
public PythonPreferencesPane(PythonDialogResources res, PythonServerOperations server) { res_ = res; server_ = server; add(headerLabel("Python")); mismatchWarningBar_ = new InfoBar(InfoBar.WARNING); mismatchWarningBar_.setText( "The active Python interpreter has been changed by an R startup script."); mismatchWarningBar_.setVisible(false); add(spaced(mismatchWarningBar_)); tbPythonInterpreter_ = new TextBoxWithButton( "Python interpreter:", "(No interpreter selected)", "Select...", null, ElementIds.TextBoxButtonId.PYTHON_DEFAULT_INTERPRETER, true, new ClickHandler() { @Override public void onClick(ClickEvent event) { getProgressIndicator().onProgress("Finding interpreters..."); server_.pythonFindInterpreters(new ServerRequestCallback<PythonInterpreters>() { @Override public void onResponseReceived(final PythonInterpreters response) { getProgressIndicator().onCompleted(); PythonInterpreterSelectionDialog dialog = new PythonInterpreterSelectionDialog( response.getPythonInterpreters(), new OperationWithInput<PythonInterpreter>() { @Override public void execute(PythonInterpreter input) { String path = input.getPath(); tbPythonInterpreter_.setText(path); } }); dialog.showModal(true); } @Override public void onError(ServerError error) { String message = "Error finding Python interpreters: " + error.getUserMessage(); getProgressIndicator().onError(message); Debug.logError(error); } }); } }); tbPythonInterpreter_.addValueChangeHandler((ValueChangeEvent<String> event) -> { updateDescription(); }); tbPythonInterpreter_.addDomHandler((BlurEvent event) -> { updateDescription(); }, BlurEvent.getType()); tbPythonInterpreter_.setWidth("420px"); tbPythonInterpreter_.setText(PYTHON_PLACEHOLDER_TEXT); tbPythonInterpreter_.setReadOnly(false); add(lessSpaced(tbPythonInterpreter_)); add(spaced(container_)); }

Target:
public PythonPreferencesPane(PythonDialogResources res, PythonServerOperations server) { res_ = res; server_ = server; add(headerLabel("Python")); mismatchWarningBar_ = new InfoBar(InfoBar.WARNING); mismatchWarningBar_.setText( "The active Python interpreter has been changed by an R startup script."); mismatchWarningBar_.setVisible(false); add(spaced(mismatchWarningBar_)); tbPythonInterpreter_ = new TextBoxWithButton( "Python interpreter:", PYTHON_PLACEHOLDER_TEXT, "Select...", null, ElementIds.TextBoxButtonId.PYTHON_DEFAULT_INTERPRETER, true, new ClickHandler() { @Override public void onClick(ClickEvent event) { getProgressIndicator().onProgress("Finding interpreters..."); server_.pythonFindInterpreters(new ServerRequestCallback<PythonInterpreters>() { @Override public void onResponseReceived(final PythonInterpreters response) { getProgressIndicator().onCompleted(); PythonInterpreterSelectionDialog dialog = new PythonInterpreterSelectionDialog( response.getPythonInterpreters(), new OperationWithInput<PythonInterpreter>() { @Override public void execute(PythonInterpreter input) { String path = input.getPath(); tbPythonInterpreter_.setText(path); } }); dialog.showModal(true); } @Override public void onError(ServerError error) { String message = "Error finding Python interpreters: " + error.getUserMessage(); getProgressIndicator().onError(message); Debug.logError(error); } }); } }); tbPythonInterpreter_.addValueChangeHandler((ValueChangeEvent<String> event) -> { updateDescription(); }); tbPythonInterpreter_.addDomHandler((BlurEvent event) -> { updateDescription(); }, BlurEvent.getType()); tbPythonInterpreter_.setWidth("420px"); tbPythonInterpreter_.setText(PYTHON_PLACEHOLDER_TEXT); tbPythonInterpreter_.setReadOnly(false); add(lessSpaced(tbPythonInterpreter_)); add(spaced(container_)); }