private void initComboValues(@NotNull Module module) { if (!module.isDisposed()) { String sdkVersion = GoSdkService.getInstance(module.getProject()).getSdkVersion(module); if (!GoVendoringUtil.vendoringCanBeDisabled(sdkVersion)) { myErrorMessageLabel.setIcon(AllIcons.General.BalloonWarning); myErrorMessageLabel.setText("Go " + sdkVersion + " doesn't support disabling vendor experiment"); myErrorMessageLabel.setVisible(true); myVendoringEnabledCombo.setEnabled(false); } else if (!GoVendoringUtil.supportsVendoring(sdkVersion) && sdkVersion != null) { myErrorMessageLabel.setIcon(AllIcons.General.BalloonWarning); myErrorMessageLabel.setText("Go " + sdkVersion + " doesn't support vendor experiment"); myErrorMessageLabel.setVisible(true); myVendoringEnabledCombo.setEnabled(true); } else { myErrorMessageLabel.setVisible(false); myVendoringEnabledCombo.setEnabled(true); } myDefaultComboText = "Default for SDK (" + (GoVendoringUtil.supportsVendoringByDefault(sdkVersion) ? ENABLED : DISABLED) + ")"; //noinspection unchecked myVendoringEnabledComboModel.update(ContainerUtil.newArrayList(myDefaultComboText, ENABLED, DISABLED)); } }
pagination.setTotalDocuments(currentResults.getTotalDocumentNumber()); if (NbPerPage.ALL.equals(pagination.getNbPerPage())) { pageNumberLabel.setVisible(false); } else { pageNumberLabel.setText( pagination.getTotalPageNumber()) ); pageNumberLabel.setVisible(true);
private void checkBackgroundSessions() { boolean hasUnselectedBackgroundSessions = isContinued() && !targetMatchesCurrentState(); if (hasUnselectedBackgroundSessions) { warningHeader.setVisible(true); warningMessage.setVisible(true); warningMessage.setText( StackdriverDebuggerBundle.getString("clouddebug.terminate.background")); } }
/** * Checks for custom SDK validation errors and shows error label if they exist. To be removed once * managed SDk feature is rolled out. */ private void updateSdkValidationLabel() { if (!ServiceManager.getService(PluginInfoService.class).shouldEnable(GctFeature.MANAGED_SDK)) { String sdkValidationMessage = CloudSdkPanel.buildSdkMessage( CloudSdkServiceUserSettings.getInstance().getCustomSdkPath(), false); if (sdkValidationMessage != null) { sdkValidationErrorLabel.setText(sdkValidationMessage); sdkValidationErrorLabel.setVisible(true); } else { sdkValidationErrorLabel.setVisible(false); } } else { sdkValidationErrorLabel.setVisible(false); } } }
private void updateEmptySelection() { projectNameLabel.setHyperlinkText( GoogleCloudCoreMessageBundle.getString("cloud.project.selector.no.selected.project")); accountInfoLabel.setHyperlinkText(""); accountInfoLabel.setIcon(null); projectAccountSeparatorLabel.setVisible(false); }
setOKButtonText(StackdriverDebuggerBundle.getString("clouddebug.attach")); infoMessage.setVisible(true); syncStashCheckbox.setVisible(false); syncStashCheckbox.addActionListener( event -> { if (syncStashCheckbox.isVisible()) { warningHeader.setVisible(!syncStashCheckbox.isSelected()); warningMessage.setVisible(!syncStashCheckbox.isSelected()); warningHeader.setVisible(false); warningHeader.setFont( new Font( warningHeader.getFont().getName(), Font.BOLD, warningHeader.getFont().getSize() - 1)); warningHeader.setForeground(JBColor.RED); warningMessage.setVisible(false); warningMessage.setFont( new Font( checkSyncStashState(); } else { warningHeader.setVisible(false); warningMessage.setVisible(false);
private void updateCloudProjectSelection(CloudProject selection) { projectNameLabel.setHyperlinkText(selection.projectName()); projectAccountSeparatorLabel.setVisible(true); // first just show account email, then expand with name/picture if this account is signed in. // if not signed in, hide icon and account name completely and prompt to sign in. accountInfoLabel.setHyperlinkText(selection.googleUsername()); IntegratedGoogleLoginService loginService = Services.getLoginService(); Optional<CredentialedUser> loggedInUser = loginService.getLoggedInUser(selection.googleUsername()); if (!loggedInUser.isPresent()) { accountInfoLabel.setHyperlinkText( GoogleCloudCoreMessageBundle.message( "cloud.project.selector.not.signed.in", selection.googleUsername())); } else if (loggedInUser.isPresent()) { accountInfoLabel.setHyperlinkText( String.format( "%s (%s)", Strings.nullToEmpty(loggedInUser.get().getName()), loggedInUser.get().getEmail())); } accountInfoLabel.setIcon( loginService.isLoggedIn() ? GoogleLoginIcons.getScaledUserIcon(ACCOUNT_ICON_SIZE, loggedInUser.orElse(null)) : null); }
projectAccountSeparatorLabel.setVisible(false /* only visible when project is selected. */);
warningHeader.setVisible(false); warningMessage.setVisible(false); checkBackgroundSessions(); } else if (syncResult.needsSync() && syncResult.getTargetSyncSha() == null) { setOkText(true); warningHeader.setVisible(true); warningMessage.setVisible(true); warningMessage.setText(StackdriverDebuggerBundle.getString("clouddebug.no.matching.sha")); } else if (syncResult.needsSync()) { } else if (!syncResult.hasRemoteRepository()) { setOkText(true); warningHeader.setVisible(true); warningMessage.setVisible(true); if (syncResult.getRepositoryType() != null) { warningMessage.setText(