# HG changeset patch # User Ed Swartz # Date 1278078333 18000 # Node ID 2f7897e1577460ab93df1735953be506cc32de08 # Parent 6615e5b1e0837a3e817eb586c6e44e8f3f76a70c# Parent ad3475a0684e41e787d21a6f25117cb1bda252ba Merge commit diff -r 6615e5b1e083 -r 2f7897e15774 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/SerialConnectionFactory.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/SerialConnectionFactory.java Fri Jul 02 08:40:16 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/SerialConnectionFactory.java Fri Jul 02 08:45:33 2010 -0500 @@ -18,19 +18,26 @@ package com.nokia.carbide.trk.support.connection; -import com.freescale.cdt.debug.cw.core.SerialConnectionSettings; -import com.nokia.carbide.remoteconnections.interfaces.*; -import com.nokia.carbide.trk.support.Messages; +import java.util.HashMap; +import java.util.Map; -import org.eclipse.jface.viewers.*; +import org.eclipse.jface.viewers.ArrayContentProvider; +import org.eclipse.jface.viewers.ComboViewer; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; -import java.util.HashMap; -import java.util.Map; +import com.freescale.cdt.debug.cw.core.SerialConnectionSettings; +import com.nokia.carbide.remoteconnections.interfaces.IConnection; +import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory; +import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; +import com.nokia.carbide.trk.support.Messages; /** * Implementation of IConnectionFactory for serial connections @@ -122,7 +129,8 @@ for (String key : map.keySet()) { ComboViewer viewer = viewers.get(key); if (viewer != null) { - viewer.setSelection(new StructuredSelection(settings.getSettings().get(key))); + String element = map.get(key); + viewer.setSelection(element != null ? new StructuredSelection(element) : StructuredSelection.EMPTY); } } }