connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/ui/ClientServiceSiteUI.java
equal
deleted
inserted
replaced
17 |
17 |
18 |
18 |
19 package com.nokia.carbide.remoteconnections.ui; |
19 package com.nokia.carbide.remoteconnections.ui; |
20 |
20 |
21 import com.nokia.carbide.remoteconnections.Messages; |
21 import com.nokia.carbide.remoteconnections.Messages; |
22 import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; |
|
23 import com.nokia.carbide.remoteconnections.interfaces.*; |
22 import com.nokia.carbide.remoteconnections.interfaces.*; |
24 import com.nokia.carbide.remoteconnections.internal.registry.Registry; |
23 import com.nokia.carbide.remoteconnections.internal.registry.Registry; |
25 import com.nokia.carbide.remoteconnections.settings.ui.SettingsWizard; |
24 import com.nokia.carbide.remoteconnections.settings.ui.SettingsWizard; |
26 import com.nokia.cpp.internal.api.utils.core.Check; |
25 import com.nokia.cpp.internal.api.utils.core.Check; |
27 import com.nokia.cpp.internal.api.utils.core.ListenerList; |
26 import com.nokia.cpp.internal.api.utils.core.ListenerList; |
203 addConnectionToViewerInput(connection); |
202 addConnectionToViewerInput(connection); |
204 } |
203 } |
205 viewer.setSelection(new StructuredSelection(connection)); |
204 viewer.setSelection(new StructuredSelection(connection)); |
206 } |
205 } |
207 |
206 |
|
207 @SuppressWarnings("unchecked") |
208 private boolean viewerInputContainsConnection(IConnection connection) { |
208 private boolean viewerInputContainsConnection(IConnection connection) { |
209 Object input = viewer.getInput(); |
209 Object input = viewer.getInput(); |
210 if (input instanceof List) { |
210 if (input instanceof Collection) { |
211 return ((List) input).contains(connection); |
211 return ((Collection) input).contains(connection); |
212 } |
212 } |
213 return false; |
213 return false; |
214 } |
214 } |
215 |
215 |
|
216 @SuppressWarnings("unchecked") |
216 private void addConnectionToViewerInput(IConnection connection) { |
217 private void addConnectionToViewerInput(IConnection connection) { |
217 Object input = viewer.getInput(); |
218 Object input = viewer.getInput(); |
218 if (input instanceof Collection) { |
219 if (input instanceof Collection) { |
219 List<IConnection> newInput = new ArrayList<IConnection>((Collection) input); |
220 List<IConnection> newInput = new ArrayList<IConnection>((Collection) input); |
220 newInput.add(connection); |
221 newInput.add(connection); |