Revision 10626 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/ClearSelectionExtension.java

View differences:

ClearSelectionExtension.java
46 46
 */
47 47
package com.iver.cit.gvsig;
48 48

  
49
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
49 50
import com.iver.andami.PluginServices;
50 51
import com.iver.andami.messages.NotificationManager;
51 52
import com.iver.andami.plugins.Extension;
52
import com.iver.cit.gvsig.fmap.DriverException;
53 53
import com.iver.cit.gvsig.fmap.MapContext;
54 54
import com.iver.cit.gvsig.fmap.MapControl;
55 55
import com.iver.cit.gvsig.fmap.layers.FLayer;
......
92 92
			}else if (view instanceof Table){
93 93
				Table table = (Table) view;
94 94
				ProjectTable model = table.getModel();
95
				SelectableDataSource dataSource;
96
				dataSource = model.getModelo().getRecordset();
95
				SelectableDataSource dataSource=null;
96
				try {
97
					dataSource = model.getModelo().getRecordset();
98
				} catch (ReadDriverException e) {
99
					e.printStackTrace();
100
				}
97 101
				if (dataSource.getSelection().cardinality() != 0) {
98 102
					refresh = true;
99 103
				}
......
125 129
							refresh = true;
126 130
						}
127 131
				        dataSource.clearSelection();
128
					} catch (DriverException e) {
132
					} catch (ReadDriverException e) {
129 133
						e.printStackTrace();
130 134
					}
131 135
				}
......
185 189
						try {
186 190
							if (lyrVect.getRecordset().getSelection().cardinality() > 0)
187 191
								return true;
188
						} catch (DriverException e) {
192
						} catch (ReadDriverException e) {
189 193
							e.printStackTrace();
190 194
							NotificationManager.addWarning("Capa " + lyrVect.getName() + " sin recordset correcto",e);
191 195
						}

Also available in: Unified diff