@Override public void reset() { myOSCombo.setSelectedItem(expandDefault(myBuildTargetSettings.getOS(), myDefaultOSValue)); myArchCombo.setSelectedItem(expandDefault(myBuildTargetSettings.getArch(), myDefaultArchValue)); myGoVersionCombo.setSelectedItem( expandDefault(myBuildTargetSettings.getGoVersion(), myDefaultGoVersion)); myCgoCombo.setSelectedItem(expandDefault(cgo(myBuildTargetSettings.getCgo()), myDefaultCgo)); myCompilerCombo.setSelectedItem(myBuildTargetSettings.getCompiler()); myCustomFlagsField.setText(StringUtil.join(myBuildTargetSettings.getCustomFlags(), " ")); }
@Override public boolean isModified() { return !myBuildTargetSettings.getOS().equals(selected(myOSCombo, myDefaultOSValue)) || !myBuildTargetSettings.getArch().equals(selected(myArchCombo, myDefaultArchValue)) || !myBuildTargetSettings .getGoVersion() .equals(selected(myGoVersionCombo, myDefaultGoVersion)) || !myBuildTargetSettings.getCgo().equals(selectedCgo()) || !myBuildTargetSettings.getCompiler().equals(selectedCompiler()) || !Arrays.equals(myBuildTargetSettings.getCustomFlags(), selectedCustomFlags()); }