Source:
private void manageExcludeFilePattern() { if (!gitStatus_ || !session_.getSessionInfo().isVcsAvailable(VCSConstants.GIT_ID)) { ((Element) listPresetExcludeFilePatterns_.getElement().getChild( Exclude.StandardGit.ordinal())) .setAttribute("disabled", "disabled"); if (listPresetExcludeFilePatterns_.getSelectedIndex() == Exclude.StandardGit.ordinal()) listPresetExcludeFilePatterns_.setSelectedIndex(Exclude.None.ordinal()); } else ((Element) listPresetExcludeFilePatterns_.getElement().getChild( Exclude.StandardGit.ordinal())).removeAttribute("disabled"); divExcludeCustomFilter_.getStyle().setDisplay( listPresetExcludeFilePatterns_.getSelectedIndex() == Exclude.CustomFilter.ordinal() ? Style.Display.BLOCK : Style.Display.NONE); if (listPresetExcludeFilePatterns_.getSelectedIndex() != Exclude.StandardGit.ordinal()) { ((Element) listPresetFilePatterns_.getElement().getChild( Include.CommonRSourceFiles.ordinal())).removeAttribute("disabled"); ((Element) listPresetFilePatterns_.getElement().getChild( Include.RScripts.ordinal())).removeAttribute("disabled"); ((Element) listPresetFilePatterns_.getElement().getChild( Include.CustomFilter.ordinal())).removeAttribute("disabled"); } else { ((Element) listPresetFilePatterns_.getElement().getChild( Include.CommonRSourceFiles.ordinal())) .setAttribute("disabled", "disabled"); ((Element) listPresetFilePatterns_.getElement().getChild( Include.RScripts.ordinal())) .setAttribute("disabled", "disabled"); ((Element) listPresetFilePatterns_.getElement().getChild( Include.CustomFilter.ordinal())) .setAttribute("disabled", "disabled"); if (listPresetFilePatterns_.getSelectedIndex() == Include.CommonRSourceFiles.ordinal() || listPresetFilePatterns_.getSelectedIndex() == Include.RScripts.ordinal() || listPresetFilePatterns_.getSelectedIndex() == Include.CustomFilter.ordinal()) listPresetFilePatterns_.setSelectedIndex(Include.AllFiles.ordinal()); manageFilePattern(); } }

Target:
private void manageExcludeFilePattern() { if (!gitStatus_ || !session_.getSessionInfo().isVcsAvailable(VCSConstants.GIT_ID)) { DomUtils.setOptionDisabled( listPresetExcludeFilePatterns_.getElement(), Exclude.StandardGit.ordinal(), true); if (listPresetExcludeFilePatterns_.getSelectedIndex() == Exclude.StandardGit.ordinal()) listPresetExcludeFilePatterns_.setSelectedIndex(Exclude.None.ordinal()); } else DomUtils.setOptionDisabled( listPresetExcludeFilePatterns_.getElement(), Exclude.StandardGit.ordinal(), false); divExcludeCustomFilter_.getStyle().setDisplay( listPresetExcludeFilePatterns_.getSelectedIndex() == Exclude.CustomFilter.ordinal() ? Style.Display.BLOCK : Style.Display.NONE); boolean disableIncludes = listPresetExcludeFilePatterns_.getSelectedIndex() == Exclude.StandardGit.ordinal(); DomUtils.setOptionDisabled( listPresetFilePatterns_.getElement(), Include.CommonRSourceFiles.ordinal(), disableIncludes); DomUtils.setOptionDisabled( listPresetFilePatterns_.getElement(), Include.RScripts.ordinal(), disableIncludes); DomUtils.setOptionDisabled( listPresetFilePatterns_.getElement(), Include.CustomFilter.ordinal(), disableIncludes); if (disableIncludes && (listPresetFilePatterns_.getSelectedIndex() == Include.CommonRSourceFiles.ordinal() || listPresetFilePatterns_.getSelectedIndex() == Include.RScripts.ordinal() || listPresetFilePatterns_.getSelectedIndex() == Include.CustomFilter.ordinal())) { listPresetFilePatterns_.setSelectedIndex(Include.AllFiles.ordinal()); manageFilePattern(); } }