/** * Call this to set a custom gradle executor. We'll enable all fields appropriately and setup the * foundation settings. We'll also fire off a refresh. * * @param file the file to use as a custom executor. Null not to use one. */ private void setCustomGradleExecutor(File file) { String storagePath; boolean isUsingCustom = false; if (file == null) { isUsingCustom = false; storagePath = null; } else { isUsingCustom = true; storagePath = file.getAbsolutePath(); } // set the executor in the foundation if (gradlePluginLord.setCustomGradleExecutor(file)) { // refresh the tasks only if we actually changed the executor gradlePluginLord.addRefreshRequestToQueue(); } // set the UI values useCustomGradleExecutorCheckBox.setSelected(isUsingCustom); customGradleExecutorField.setText(storagePath); // enable the UI appropriately. browseForCustomGradleExecutorButton.setEnabled(isUsingCustom); customGradleExecutorField.setEnabled(isUsingCustom); // store the settings settingsNode.setValueOfChild(CUSTOM_GRADLE_EXECUTOR, storagePath); }
private void setCurrentDirectory(File file) { if (file == null) { currentDirectoryTextField.setText(""); settingsNode.setValueOfChild(CURRENT_DIRECTORY, ""); } else { currentDirectoryTextField.setText(file.getAbsolutePath()); settingsNode.setValueOfChild(CURRENT_DIRECTORY, file.getAbsolutePath()); } if (gradlePluginLord.setCurrentDirectory(file)) { // refresh the tasks only if we actually changed the current directory gradlePluginLord.addRefreshRequestToQueue(); } }
public void executeAgain(GradlePluginLord gradlePluginLord) { gradlePluginLord.addRefreshRequestToQueue(); }