author | John Dean <john.3.dean@nokia.com> |
Wed, 17 Feb 2010 12:59:07 -0800 | |
changeset 980 | 2856f9bc4ddf |
parent 856 | 74d8d653d11a |
permissions | -rw-r--r-- |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
1 |
/* |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
8 |
* |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
11 |
* |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
13 |
* |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
15 |
* |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
17 |
package com.nokia.carbide.remoteconnections.internal.ui; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
18 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
19 |
import java.net.URL; |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
20 |
import java.text.MessageFormat; |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
21 |
import java.util.ArrayList; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
22 |
import java.util.Collection; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
23 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
24 |
import org.eclipse.jface.dialogs.IDialogConstants; |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
25 |
import org.eclipse.jface.dialogs.TrayDialog; |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
26 |
import org.eclipse.jface.viewers.ArrayContentProvider; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
27 |
import org.eclipse.jface.viewers.ISelection; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
28 |
import org.eclipse.jface.viewers.ISelectionChangedListener; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
29 |
import org.eclipse.jface.viewers.IStructuredSelection; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
30 |
import org.eclipse.jface.viewers.LabelProvider; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
31 |
import org.eclipse.jface.viewers.ListViewer; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
32 |
import org.eclipse.jface.viewers.SelectionChangedEvent; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
33 |
import org.eclipse.jface.viewers.StructuredSelection; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
34 |
import org.eclipse.jface.window.IShellProvider; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
35 |
import org.eclipse.swt.SWT; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
36 |
import org.eclipse.swt.custom.SashForm; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
37 |
import org.eclipse.swt.events.SelectionAdapter; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
38 |
import org.eclipse.swt.events.SelectionEvent; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
39 |
import org.eclipse.swt.graphics.Point; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
40 |
import org.eclipse.swt.layout.GridData; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
41 |
import org.eclipse.swt.layout.GridLayout; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
42 |
import org.eclipse.swt.widgets.Button; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
43 |
import org.eclipse.swt.widgets.Composite; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
44 |
import org.eclipse.swt.widgets.Control; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
45 |
import org.eclipse.swt.widgets.Display; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
46 |
import org.eclipse.swt.widgets.Event; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
47 |
import org.eclipse.swt.widgets.Link; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
48 |
import org.eclipse.swt.widgets.Listener; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
49 |
import org.eclipse.swt.widgets.Shell; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
50 |
import org.eclipse.swt.widgets.Text; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
51 |
import org.eclipse.ui.IWorkbench; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
52 |
import org.eclipse.ui.PlatformUI; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
53 |
import org.eclipse.ui.browser.IWebBrowser; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
54 |
|
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
55 |
import com.nokia.carbide.remoteconnections.Messages; |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
56 |
import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
57 |
|
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
58 |
public class DeviceDiscoveryPrequisiteErrorDialog extends TrayDialog { |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
59 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
60 |
private class AgentItem { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
61 |
public String agentName; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
62 |
public String agentErrorText; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
63 |
public URL agentLocation; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
64 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
65 |
AgentItem(String name, String text, URL location) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
66 |
agentName = name; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
67 |
agentErrorText = text; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
68 |
agentLocation = location; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
69 |
// if location is not null and error text doesn't contain href |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
70 |
// then do it here |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
71 |
if (agentLocation != null && !agentErrorText.contains("href")) { //$NON-NLS-1$ |
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
72 |
String msg = MessageFormat.format(Messages.getString("DeviceDiscoveryPrequisiteErrorDialog_ErrorFormatWithURL"), //$NON-NLS-1$ |
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
73 |
agentErrorText, location, location); |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
74 |
agentErrorText = msg; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
75 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
76 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
77 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
78 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
79 |
private Collection<AgentItem> agentList = new ArrayList<AgentItem>(); |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
80 |
private boolean dontAskAgain; |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
81 |
private ListViewer agentListViewer; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
82 |
private Link errorText; |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
83 |
private Button dontAskAgainCheckBox; |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
84 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
85 |
/** |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
86 |
* @param parentShell |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
87 |
*/ |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
88 |
public DeviceDiscoveryPrequisiteErrorDialog(Shell parentShell) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
89 |
super(parentShell); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
90 |
agentList.clear(); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
91 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
92 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
93 |
/** |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
94 |
* @param parentShell |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
95 |
*/ |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
96 |
public DeviceDiscoveryPrequisiteErrorDialog(IShellProvider parentShell) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
97 |
super(parentShell); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
98 |
agentList.clear(); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
99 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
100 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
101 |
public void addAgentData(String name, String errorText, URL location) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
102 |
agentList.add(new AgentItem(name, errorText, location)); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
103 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
104 |
|
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
105 |
public boolean isDontAskAgainChecked() { |
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
106 |
return dontAskAgain; |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
107 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
108 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
109 |
@Override |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
110 |
protected void createButtonsForButtonBar(Composite parent) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
111 |
// OK button == "Close" |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
112 |
// no Cancel button |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
113 |
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, true); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
114 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
115 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
116 |
@Override |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
117 |
protected Control createDialogArea(Composite parent) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
118 |
initializeDialogUnits(parent); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
119 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
120 |
Composite container = new Composite(parent, SWT.NONE); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
121 |
GridLayout layout = new GridLayout(1, true); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
122 |
container.setLayout(layout); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
123 |
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
124 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
125 |
// Message at top |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
126 |
Text topMessage = new Text(container, SWT.MULTI | SWT.WRAP); |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
127 |
topMessage.setText(Messages.getString("DeviceDiscoveryPrequisiteErrorDialog_Description")); //$NON-NLS-1$ |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
128 |
topMessage.setEditable(false); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
129 |
topMessage.setDoubleClickEnabled(false); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
130 |
GridData topMsgData = new GridData(SWT.LEFT, SWT.CENTER, true, false); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
131 |
topMsgData.heightHint = 48; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
132 |
topMessage.setLayoutData(topMsgData); |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
133 |
topMessage.setToolTipText(Messages.getString("DeviceDiscoveryPrequisiteErrorDialog_ToolTipText")); //$NON-NLS-1$ |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
134 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
135 |
// next two panes can be resized with a sash form |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
136 |
SashForm sashForm = new SashForm(container, SWT.VERTICAL); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
137 |
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
138 |
sashForm.setLayoutData(gridData); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
139 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
140 |
// this pane lists all the agent display names |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
141 |
agentListViewer = new ListViewer(sashForm, SWT.V_SCROLL | SWT.BORDER); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
142 |
agentListViewer.setContentProvider(new ArrayContentProvider()); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
143 |
agentListViewer.setLabelProvider(new LabelProvider() { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
144 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
145 |
@Override |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
146 |
public String getText(Object element) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
147 |
return ((AgentItem)element).agentName; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
148 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
149 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
150 |
}); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
151 |
agentListViewer.addSelectionChangedListener(new ISelectionChangedListener() { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
152 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
153 |
public void selectionChanged(SelectionChangedEvent event) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
154 |
IStructuredSelection selection = (IStructuredSelection) event.getSelection(); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
155 |
AgentItem item = (AgentItem) selection.getFirstElement(); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
156 |
errorText.setText(item.agentErrorText); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
157 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
158 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
159 |
}); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
160 |
agentListViewer.setInput(agentList); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
161 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
162 |
// pane to view the information about the selected agent |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
163 |
errorText = new Link(sashForm, SWT.V_SCROLL | SWT.BORDER | SWT.WRAP); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
164 |
errorText.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND)); |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
165 |
errorText.setToolTipText(Messages.getString("DeviceDiscoveryPrequisiteErrorDialog_ErrorTextToolTipText")); //$NON-NLS-1$ |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
166 |
errorText.addListener(SWT.Selection, new Listener() { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
167 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
168 |
public void handleEvent(Event event) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
169 |
// Launch an external browser |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
170 |
String siteText = event.text; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
171 |
IWorkbench workbench = PlatformUI.getWorkbench(); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
172 |
try { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
173 |
IWebBrowser browser = workbench.getBrowserSupport().getExternalBrowser(); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
174 |
browser.openURL(new URL(siteText)); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
175 |
} catch (Exception e) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
176 |
RemoteConnectionsActivator.logError(e); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
177 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
178 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
179 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
180 |
}); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
181 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
182 |
// add initial weights to the above two panes |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
183 |
sashForm.setWeights(new int[] {150,200}); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
184 |
|
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
185 |
// now the don't ask again check box |
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
186 |
dontAskAgainCheckBox = new Button(container, SWT.CHECK); |
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
187 |
dontAskAgainCheckBox.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false)); |
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
188 |
dontAskAgainCheckBox.setText(Messages.getString("DeviceDiscoveryPrequisiteErrorDialog_DontAskAgainLabel")); //$NON-NLS-1$ |
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
189 |
dontAskAgainCheckBox.setToolTipText(Messages.getString("DeviceDiscoveryPrequisiteErrorDialog_DontAskAgainToolTipText")); //$NON-NLS-1$ |
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
190 |
dontAskAgainCheckBox.addSelectionListener(new SelectionAdapter() { |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
191 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
192 |
public void widgetSelected(SelectionEvent e) { |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
193 |
dontAskAgain = dontAskAgainCheckBox.getSelection(); |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
194 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
195 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
196 |
}); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
197 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
198 |
// now finish by selecting the top most agent in the list |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
199 |
// and bringing it into view |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
200 |
Object o = agentListViewer.getElementAt(0); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
201 |
if (o != null) |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
202 |
agentListViewer.setSelection(new StructuredSelection(o)); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
203 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
204 |
ISelection selection = agentListViewer.getSelection(); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
205 |
if (selection != null && !selection.isEmpty()) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
206 |
agentListViewer.reveal(selection); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
207 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
208 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
209 |
return container; |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
210 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
211 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
212 |
@Override |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
213 |
protected Point getInitialSize() { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
214 |
return new Point(400,400); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
215 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
216 |
|
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
217 |
@Override |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
218 |
protected void configureShell(Shell newShell) { |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
219 |
super.configureShell(newShell); |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
220 |
// set our title to the dialog |
856
74d8d653d11a
tweaks to new discovery error dialog and calling code
dadubrow
parents:
849
diff
changeset
|
221 |
newShell.setText(Messages.getString("DeviceDiscoveryPrequisiteErrorDialog_Title")); //$NON-NLS-1$ |
849
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
222 |
} |
d8886f16bea3
Add dialog to notify user of discovery agents not loaded because prerequisites not satisfied. Bug 10486
Chad Peckham <chad.peckham@nokia.com>
parents:
diff
changeset
|
223 |
} |