APISonar


com.goide.project.GoBuildTargetSettings.os

> com > goide > project > GoBuildTargetSettings > os
com APIs goide APIs project APIs GoBuildTargetSettings APIs os APIs

Example 1
public void setUp() throws Exception {
    super.setUp();
    GoBuildTargetSettings buildTargetSettings = new GoBuildTargetSettings();
    buildTargetSettings.os = "darwin";
    buildTargetSettings.arch = "amd64";
    buildTargetSettings.goVersion = "1.5.1";
    GoModuleSettings.getInstance(myFixture.getModule()).setBuildTargetSettings(buildTargetSettings);
  }
Example 2
public static GoTargetSystem forModule(@NotNull Module module) {
    return CachedValuesManager.getManager(module.getProject()).getCachedValue(module, () -> {
      GoBuildTargetSettings settings = GoModuleSettings.getInstance(module).getBuildTargetSettings();
      String os = realValue(settings.os, GoUtil.systemOS());
      String arch = realValue(settings.arch, GoUtil.systemArch());
      ThreeState cgo = settings.cgo == ThreeState.UNSURE ? GoUtil.systemCgo(os, arch) : settings.cgo;
      String moduleSdkVersion = GoSdkService.getInstance(module.getProject()).getSdkVersion(module);
      String[] customFlags = GoSdkService.getInstance(module.getProject()).isAppEngineSdk(module)
                             ? ArrayUtil.prepend(GAE_BUILD_FLAG, settings.customFlags)
                             : settings.customFlags;
      String compiler = GoBuildTargetSettings.ANY_COMPILER.equals(settings.compiler) ? null : settings.compiler;
      GoTargetSystem result = new GoTargetSystem(os, arch, realValue(settings.goVersion, moduleSdkVersion), compiler, cgo, customFlags);
      return CachedValueProvider.Result.create(result, settings);
    });
  }
Example 3
public void apply(@NotNull GoBuildTargetSettings buildTargetSettings) {
    buildTargetSettings.os = selected(myOSCombo, myDefaultOSValue);
    buildTargetSettings.arch = selected(myArchCombo, myDefaultArchValue);
    buildTargetSettings.goVersion = selected(myGoVersionCombo, myDefaultGoVersion);
    buildTargetSettings.compiler = selectedCompiler();
    buildTargetSettings.cgo = selectedCgo();
    buildTargetSettings.customFlags = selectedCustomTags();
  }
Example 4
public void reset(@NotNull GoBuildTargetSettings buildTargetSettings) {
    myOSCombo.setSelectedItem(expandDefault(buildTargetSettings.os, myDefaultOSValue));
    myArchCombo.setSelectedItem(expandDefault(buildTargetSettings.arch, myDefaultArchValue));
    myGoVersionCombo.setSelectedItem(expandDefault(buildTargetSettings.goVersion, myDefaultGoVersion));
    myCgoCombo.setSelectedItem(expandDefault(cgo(buildTargetSettings.cgo), myDefaultCgo));
    myCompilerCombo.setSelectedItem(buildTargetSettings.compiler);
    myCustomTagsField.setText(StringUtil.join(buildTargetSettings.customFlags, " "));
  }