File tree Expand file tree Collapse file tree 4 files changed +55
-0
lines changed
PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij
Utils/azuretools-core/src/com/microsoft/azuretools Expand file tree Collapse file tree 4 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 55
66package com .microsoft .intellij .helpers ;
77
8+ import com .microsoft .azuretools .azurecommons .helpers .NotNull ;
89import com .microsoft .azuretools .core .mvp .ui .base .MvpUIHelper ;
10+ import com .microsoft .intellij .secure .IdeaSecureStore ;
911import com .microsoft .tooling .msservices .components .DefaultLoader ;
1012
1113import javax .swing .*;
@@ -21,4 +23,10 @@ public void showError(String msg) {
2123 public void showException (String msg , Exception e ) {
2224 DefaultLoader .getUIHelper ().showError (e .getMessage (), msg );
2325 }
26+
27+ @ Deprecated
28+ @ Override
29+ public String loadPasswordFromSecureStore (@ NotNull String serviceName , @ NotNull String userName ) {
30+ return IdeaSecureStore .getInstance ().loadPassword (serviceName , userName );
31+ }
2432}
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) Microsoft Corporation. All rights reserved.
3+ * Licensed under the MIT License. See License.txt in the project root for license information.
4+ */
5+
6+ package com .microsoft .intellij .ui ;
7+
8+ import com .intellij .openapi .util .SystemInfo ;
9+ import com .intellij .ui .components .JBLabel ;
10+ import com .intellij .ui .scale .JBUIScale ;
11+ import com .intellij .util .ui .UIUtil ;
12+ import org .jetbrains .annotations .NotNull ;
13+
14+ import javax .swing .plaf .FontUIResource ;
15+ import javax .swing .plaf .LabelUI ;
16+ import java .awt .*;
17+
18+ public class AzureCommentLabel extends JBLabel {
19+ public AzureCommentLabel (@ NotNull String text ) {
20+ super (text );
21+ setForeground (UIUtil .getContextHelpForeground ());
22+ }
23+
24+ @ Override
25+ public void setUI (LabelUI ui ) {
26+ super .setUI (ui );
27+
28+ if (SystemInfo .isMac ) {
29+ Font font = getFont ();
30+ float size = font .getSize2D ();
31+ font = new FontUIResource (font .deriveFont (size - JBUIScale .scale (2 ))); // Allow to reset the font by UI
32+ setFont (font );
33+ }
34+ }
35+ }
Original file line number Diff line number Diff line change @@ -33,11 +33,17 @@ public class AuthMethodDetails {
3333 @ Getter
3434 private String clientId ;
3535
36+ @ Deprecated
3637 @ JsonProperty
3738 @ Setter
3839 @ Getter
3940 private String credFilePath ;
4041
42+ @ JsonProperty
43+ @ Setter
44+ @ Getter
45+ private String certificate ;
46+
4147 @ JsonProperty
4248 @ Setter
4349 @ Getter
Original file line number Diff line number Diff line change 55
66package com .microsoft .azuretools .core .mvp .ui .base ;
77
8+ import com .microsoft .azuretools .azurecommons .helpers .NotNull ;
9+
810public interface MvpUIHelper {
911
1012 void showError (String message );
1113
1214 void showException (String message , Exception e );
1315
16+ @ Deprecated
17+ default String loadPasswordFromSecureStore (@ NotNull String serviceName , @ NotNull String userName ) {
18+ return null ;
19+ }
1420}
You can’t perform that action at this time.
0 commit comments