Skip to content

Commit 30c1b32

Browse files
committed
[EC] remove hint for manually generating sp
1 parent fc74856 commit 30c1b32

File tree

1 file changed

+8
-33
lines changed
  • PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.core/src/com/microsoft/azuretools/core/ui

1 file changed

+8
-33
lines changed

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.core/src/com/microsoft/azuretools/core/ui/SignInDialog.java

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
import java.io.IOException;
2525
import java.lang.reflect.InvocationTargetException;
26-
import java.net.MalformedURLException;
27-
import java.net.URL;
2826
import java.util.HashMap;
2927
import java.util.LinkedList;
3028
import java.util.List;
@@ -36,7 +34,6 @@
3634
import org.eclipse.core.runtime.Status;
3735
import org.eclipse.jface.dialogs.IDialogConstants;
3836
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
39-
import org.eclipse.jface.dialogs.TitleAreaDialog;
4037
import org.eclipse.jface.operation.IRunnableWithProgress;
4138
import org.eclipse.jface.window.Window;
4239
import org.eclipse.swt.SWT;
@@ -54,9 +51,6 @@
5451
import org.eclipse.swt.widgets.Label;
5552
import org.eclipse.swt.widgets.Shell;
5653
import org.eclipse.swt.widgets.Text;
57-
import org.eclipse.ui.PartInitException;
58-
import org.eclipse.ui.PlatformUI;
59-
6054
import com.microsoft.azuretools.adauth.AuthCanceledException;
6155
import com.microsoft.azuretools.adauth.StringUtils;
6256
import com.microsoft.azuretools.authmanage.AdAuthManager;
@@ -67,7 +61,6 @@
6761
import com.microsoft.azuretools.core.Activator;
6862
import com.microsoft.azuretools.core.components.AzureTitleAreaDialogWrapper;
6963
import com.microsoft.azuretools.sdkmanage.AccessTokenAzureManager;
70-
import org.eclipse.swt.widgets.Link;
7164

7265
public class SignInDialog extends AzureTitleAreaDialogWrapper {
7366
private static ILog LOG = Activator.getDefault().getLog();
@@ -83,7 +76,6 @@ public class SignInDialog extends AzureTitleAreaDialogWrapper {
8376
private AuthMethodDetails authMethodDetails;
8477
private String accountEmail;
8578
FileDialog fileDialog;
86-
private Link link;
8779

8880
public AuthMethodDetails getAuthMethodDetails() {
8981
return authMethodDetails;
@@ -98,7 +90,7 @@ public SignInDialog(Shell parentShell) {
9890
setHelpAvailable(false);
9991
setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
10092
}
101-
93+
10294
public static SignInDialog go(Shell parentShell, AuthMethodDetails authMethodDetails) {
10395
SignInDialog d = new SignInDialog(parentShell);
10496
d.authMethodDetails = authMethodDetails;
@@ -145,7 +137,7 @@ public void widgetSelected(SelectionEvent e) {
145137
}
146138
});
147139
rbtnInteractive.setText("Interactive");
148-
140+
149141
Composite compositeInteractive = new Composite(group, SWT.NONE);
150142
GridData gd_compositeInteractive = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
151143
gd_compositeInteractive.heightHint = 38;
@@ -167,11 +159,11 @@ public void widgetSelected(SelectionEvent e) {
167159
}
168160
});
169161
rbtnAutomated.setText("Automated");
170-
162+
171163
Composite compositeAutomated = new Composite(group, SWT.NONE);
172164
compositeAutomated.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
173165
compositeAutomated.setLayout(new GridLayout(2, false));
174-
166+
175167
lblAutomatedInfo = new Label(compositeAutomated, SWT.WRAP | SWT.HORIZONTAL);
176168
lblAutomatedInfo.setEnabled(false);
177169
GridData gd_lblAutomatedInfo = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
@@ -180,15 +172,15 @@ public void widgetSelected(SelectionEvent e) {
180172
gd_lblAutomatedInfo.heightHint = 49;
181173
lblAutomatedInfo.setLayoutData(gd_lblAutomatedInfo);
182174
lblAutomatedInfo.setText("An authentication file with credentials for an Azure Active Directory service principal will be used for automated sign ins.");
183-
175+
184176
lblAuthenticationFile = new Label(compositeAutomated, SWT.NONE);
185177
lblAuthenticationFile.setEnabled(false);
186178
GridData gd_lblAuthenticationFile = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
187179
gd_lblAuthenticationFile.horizontalIndent = 10;
188180
lblAuthenticationFile.setLayoutData(gd_lblAuthenticationFile);
189181
lblAuthenticationFile.setText("Authentication file:");
190182
new Label(compositeAutomated, SWT.NONE);
191-
183+
192184
textAuthenticationFilePath = new Text(compositeAutomated, SWT.BORDER | SWT.READ_ONLY);
193185
textAuthenticationFilePath.setEnabled(false);
194186
GridData gd_textAuthenticationFilePath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
@@ -205,7 +197,7 @@ public void widgetSelected(SelectionEvent e) {
205197
});
206198
btnBrowse.setText("Browse...");
207199
new Label(compositeAutomated, SWT.NONE);
208-
200+
209201
btnCreateAuthenticationFile = new Button(compositeAutomated, SWT.NONE);
210202
btnCreateAuthenticationFile.addSelectionListener(new SelectionAdapter() {
211203
@Override
@@ -216,24 +208,7 @@ public void widgetSelected(SelectionEvent e) {
216208
btnCreateAuthenticationFile.setEnabled(false);
217209
btnCreateAuthenticationFile.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
218210
btnCreateAuthenticationFile.setText("New...");
219-
220-
link = new Link(compositeAutomated, SWT.NONE);
221-
link.addSelectionListener(new SelectionAdapter() {
222-
@Override
223-
public void widgetSelected(SelectionEvent e) {
224-
try {
225-
PlatformUI.getWorkbench().getBrowserSupport().
226-
getExternalBrowser().openURL(new URL("https://go.microsoft.com/fwlink/?linkid=847862"));
227-
} catch (PartInitException | MalformedURLException ex) {
228-
LOG.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "widgetSelected@SelectionAdapter@link@SignInDialog", ex));
229-
}
230-
}
231-
});
232-
GridData gd_link = new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1);
233-
gd_link.widthHint = 312;
234-
link.setLayoutData(gd_link);
235-
link.setText("Follow these manual <a>steps</a> if Azure Toolkit fails to create an authentication file programmatically.");
236-
211+
237212
fileDialog = new FileDialog(btnBrowse.getShell(), SWT.OPEN);
238213
fileDialog.setText("Select Authentication File");
239214
fileDialog.setFilterPath(System.getProperty("user.home"));

0 commit comments

Comments
 (0)