private void cpplintPathChange(String newPath) { if (!checkPathExist(newPath)) { enableCpplintOnSave.setEnabled(false, getFieldEditorParent()); this.setValid(false); this.setErrorMessage("Cpplint path \"" + newPath + "\" does not exist"); } else { enableCpplintOnSave.setEnabled(true, getFieldEditorParent()); this.setValid(true); this.setErrorMessage(null); } } }
private void clangFormatPathChange(String newPath) { if (!checkPathExist(newPath)) { enableClangFormatOnSave.setEnabled(false, getFieldEditorParent()); this.setValid(false); this.setErrorMessage("Clang-format path \"" + newPath + "\" does not exist"); } else { enableClangFormatOnSave.setEnabled(true, getFieldEditorParent()); this.setValid(true); this.setErrorMessage(null); } }
private void updateFieldEnablement() { boolean arePotentialMatchesIgnored= fIgnorePotentialMatchesCheckbox.getBooleanValue(); fEmphasizedCheckbox.setEnabled(!arePotentialMatchesIgnored, getFieldEditorParent()); fColorEditor.setEnabled(!arePotentialMatchesIgnored && fEmphasizedCheckbox.getBooleanValue(), getFieldEditorParent()); }
private void updateFieldEnablement() { boolean arePotentialMatchesIgnored= fIgnorePotentialMatchesCheckbox.getBooleanValue(); fEmphasizedCheckbox.setEnabled(!arePotentialMatchesIgnored, getFieldEditorParent()); fColorEditor.setEnabled(!arePotentialMatchesIgnored && fEmphasizedCheckbox.getBooleanValue(), getFieldEditorParent()); }
/** * Creates the field editors. Field editors are abstractions of the common * GUI blocks needed to manipulate various types of preferences. Each field * editor knows how to save and restore itself. */ public void createFieldEditors() { clangFormatPath = new FileFieldEditor(CppStyleConstants.CLANG_FORMAT_PATH, "Clang-format path:", getFieldEditorParent()); addField(clangFormatPath); cpplintPath = new FileFieldEditor(CppStyleConstants.CPPLINT_PATH, "Cpplint path:", getFieldEditorParent()); addField(cpplintPath); enableCpplintOnSave = new BooleanFieldEditor(CppStyleConstants.ENABLE_CPPLINT_ON_SAVE, CppStyleConstants.ENABLE_CPPLINT_TEXT, getFieldEditorParent()); if (!checkPathExist(CppStyle.getCpplintPath())) { enableCpplintOnSave.setEnabled(false, getFieldEditorParent()); } addField(enableCpplintOnSave); enableClangFormatOnSave = new BooleanFieldEditor(CppStyleConstants.ENABLE_CLANGFORMAT_ON_SAVE, CppStyleConstants.ENABLE_CLANGFORMAT_TEXT, getFieldEditorParent()); if (!checkPathExist(ClangFormatFormatter.getClangFormatPath())) { enableClangFormatOnSave.setEnabled(false, getFieldEditorParent()); } addField(enableClangFormatOnSave); }
indexJars.setEnabled(false, getFieldEditorParent()); indexJars.setEnabled(true, getFieldEditorParent());
addField(fColorEditor); fEmphasizedCheckbox.setEnabled(!arePotentialMatchesIgnored(), getFieldEditorParent()); fColorEditor.setEnabled(!arePotentialMatchesIgnored() && arePotentialMatchesEmphasized(), getFieldEditorParent());
addField(fColorEditor); fEmphasizedCheckbox.setEnabled(!arePotentialMatchesIgnored(), getFieldEditorParent()); fColorEditor.setEnabled(!arePotentialMatchesIgnored() && arePotentialMatchesEmphasized(), getFieldEditorParent());