use of com.google.cloud.tools.intellij.service.PluginInfoService in project google-cloud-intellij by GoogleCloudPlatform.
the class CloudSdkAppEngineHelper method createSdk.
@Override
public CloudSdk createSdk(LoggingHandler loggingHandler, ProcessStartListener startListener, ProcessOutputLineListener logListener, ProcessOutputLineListener outputListener, ProcessExitListener exitListener) {
if (credentialsPath == null) {
loggingHandler.print(GctBundle.message("appengine.action.credential.not.found") + "\n");
throw new AppEngineException("Failed to create application default credentials.");
}
PluginInfoService pluginInfoService = ServiceManager.getService(PluginInfoService.class);
CloudSdk.Builder sdkBuilder = new CloudSdk.Builder().sdkPath(CloudSdkService.getInstance().getSdkHomePath()).async(true).addStdErrLineListener(logListener).addStdOutLineListener(outputListener).exitListener(exitListener).startListener(startListener).appCommandCredentialFile(credentialsPath.toFile()).appCommandMetricsEnvironment(pluginInfoService.getExternalPluginName()).appCommandMetricsEnvironmentVersion(pluginInfoService.getPluginVersion()).appCommandOutputFormat("json");
getProjectJavaSdk(project).ifPresent(sdkBuilder::javaHome);
return sdkBuilder.build();
}
use of com.google.cloud.tools.intellij.service.PluginInfoService in project google-cloud-intellij by GoogleCloudPlatform.
the class CloudToolsPluginInitializationComponent method initComponent.
@Override
public void initComponent() {
if (!ApplicationManager.getApplication().isUnitTestMode()) {
configureUsageTracking();
}
Services.getLoginService().loadPersistedCredentials();
PluginConfigurationService pluginConfigurationService = ServiceManager.getService(PluginConfigurationService.class);
PluginInfoService pluginInfoService = ServiceManager.getService(PluginInfoService.class);
if (pluginInfoService.shouldEnableErrorFeedbackReporting()) {
initErrorReporting(pluginConfigurationService, pluginInfoService);
}
new ConflictingAppEnginePluginCheck().notifyIfConflicting();
new GoogleAccountPluginUninstaller().uninstallIfPresent();
if (!ApplicationManager.getApplication().isUnitTestMode()) {
ServiceManager.getService(CloudSdkServiceManager.class).getCloudSdkService().activate();
}
}
Aggregations