Codota Logo
CloudSdkServiceManager.onNewCloudSdkServiceTypeSelected
Code IndexAdd Codota to your IDE (free)

How to use
onNewCloudSdkServiceTypeSelected
method
in
com.google.cloud.tools.intellij.appengine.java.sdk.CloudSdkServiceManager

Best Java code snippets using com.google.cloud.tools.intellij.appengine.java.sdk.CloudSdkServiceManager.onNewCloudSdkServiceTypeSelected (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: GoogleCloudPlatform/google-cloud-intellij

public void apply() throws ConfigurationException {
 CloudSdkServiceUserSettings sdkServiceUserSettings = CloudSdkServiceUserSettings.getInstance();
 if (customRadioButton.isSelected()) {
  String customSdkPathText = getCloudSdkDirectoryText();
  if (CloudSdkValidator.getInstance()
    .validateCloudSdk(customSdkPathText)
    .contains(CloudSdkValidationResult.MALFORMED_PATH)) {
   throw new ConfigurationException(
     CloudSdkMessageBundle.message("appengine.cloudsdk.location.badchars.message"));
  }
  sdkServiceUserSettings.setCustomSdkPath(customSdkPathText);
 }
 CloudSdkServiceType previousSdkType = sdkServiceUserSettings.getUserSelectedSdkServiceType();
 if (previousSdkType != selectedCloudSdkServiceType) {
  // notify SDK manager about changed selection
  ServiceManager.getService(CloudSdkServiceManager.class)
    .onNewCloudSdkServiceTypeSelected(selectedCloudSdkServiceType);
 }
 sdkServiceUserSettings.setUserSelectedSdkServiceType(selectedCloudSdkServiceType);
 boolean previousAutomaticUpdateEnabled = sdkServiceUserSettings.isAutomaticUpdateEnabled();
 sdkServiceUserSettings.setEnableAutomaticUpdates(enableAutomaticUpdatesCheckbox.isSelected());
 if (enableAutomaticUpdatesCheckbox.isSelected() && !previousAutomaticUpdateEnabled) {
  // activate updates again.
  ManagedCloudSdkUpdateService.getInstance().activate();
 }
 // settings are applied and saved, clear modification status
 settingsModified = false;
}
origin: GoogleCloudPlatform/google-cloud-intellij

@Test
public void changeSdkType_apply_callsChangedSdkTypeCallback() {
 ApplicationManager.getApplication()
   .invokeAndWait(
     () -> {
      // use non-spy panel as spy messes up with UI event thread field updates.
      CloudSdkPanel sdkPanel = new CloudSdkPanel();
      CloudSdkServiceUserSettings.getInstance()
        .setUserSelectedSdkServiceType(CloudSdkServiceType.MANAGED_SDK);
      sdkPanel.reset();
      sdkPanel.getCustomRadioButton().doClick();
      String customSdkPath = "/home/gcloud";
      sdkPanel.getCloudSdkDirectoryField().setText(customSdkPath);
      try {
       sdkPanel.apply();
      } catch (ConfigurationException e) {
       throw new AssertionError(e);
      }
      verify(mockCloudSdkServiceManager)
        .onNewCloudSdkServiceTypeSelected(CloudSdkServiceType.CUSTOM_SDK);
     });
}
com.google.cloud.tools.intellij.appengine.java.sdkCloudSdkServiceManageronNewCloudSdkServiceTypeSelected

Javadoc

Callback when a user selected and applied a new cloud sdk type.

Popular methods of CloudSdkServiceManager

  • getCloudSdkService
  • getInstance
  • checkIfCancelled
  • getSdkReadLock
    Lock to be acquired on all SDK read (i.e. execute gcloud) operations. Can be held by multiple operat
  • runWhenSdkReady
    Waits in background for Cloud SDK to be ready for all operations and then runs the given runnable. I
  • showCloudSdkNotification
  • blockUntilSdkReady
    Blocks current thread until Cloud SDK is ready for all operations. If process results in error or us
  • doWait
    Performs generic wait in a separate thread for SDK to become ready, returns immediately. Must be cal
  • getSdkWriteLock
    Lock to be acquired on all SDK write (i.e. delete, replace, update SDK files) operations. Exclusive,
  • isInstallInProgress
    Checks if current SDK service is currently installing and not ready for operations.

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Path (java.nio.file)
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now