Revision 10626 trunk/extensions/extCAD/src/com/iver/cit/gvsig/StopEditing.java
StopEditing.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig; |
2 | 2 |
|
3 | 3 |
import java.awt.Component; |
4 |
import java.io.IOException; |
|
5 | 4 |
|
6 | 5 |
import javax.swing.JOptionPane; |
7 | 6 |
|
8 |
import com.hardcode.gdbms.engine.instruction.FieldNotFoundException; |
|
7 |
import com.hardcode.gdbms.driver.exceptions.InitializeWriterException; |
|
8 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
|
9 | 9 |
import com.iver.andami.PluginServices; |
10 | 10 |
import com.iver.andami.messages.NotificationManager; |
11 | 11 |
import com.iver.andami.plugins.Extension; |
12 |
import com.iver.cit.gvsig.fmap.DriverException; |
|
12 |
import com.iver.cit.gvsig.exceptions.layers.LegendLayerException; |
|
13 |
import com.iver.cit.gvsig.exceptions.layers.StartEditionLayerException; |
|
14 |
import com.iver.cit.gvsig.exceptions.layers.StopEditionLayerException; |
|
15 |
import com.iver.cit.gvsig.exceptions.table.CancelEditingTableException; |
|
16 |
import com.iver.cit.gvsig.exceptions.visitors.StopWriterVisitorException; |
|
13 | 17 |
import com.iver.cit.gvsig.fmap.MapContext; |
14 | 18 |
import com.iver.cit.gvsig.fmap.MapControl; |
15 | 19 |
import com.iver.cit.gvsig.fmap.drivers.FieldDescription; |
16 | 20 |
import com.iver.cit.gvsig.fmap.drivers.ILayerDefinition; |
17 | 21 |
import com.iver.cit.gvsig.fmap.drivers.shp.IndexedShpDriver; |
18 | 22 |
import com.iver.cit.gvsig.fmap.edition.EditionEvent; |
19 |
import com.iver.cit.gvsig.fmap.edition.EditionException; |
|
20 | 23 |
import com.iver.cit.gvsig.fmap.edition.ISpatialWriter; |
21 | 24 |
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter; |
22 | 25 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
... | ... | |
150 | 153 |
return true; |
151 | 154 |
} |
152 | 155 |
|
153 |
} catch (EditionException e) {
|
|
156 |
} catch (LegendLayerException e) {
|
|
154 | 157 |
NotificationManager.addError(e); |
155 |
} catch (IOException e) {
|
|
158 |
} catch (StartEditionLayerException e) {
|
|
156 | 159 |
NotificationManager.addError(e); |
157 |
} catch (DriverException e) { |
|
160 |
} catch (ReadDriverException e) {
|
|
158 | 161 |
NotificationManager.addError(e); |
159 |
} catch (FieldNotFoundException e) { |
|
160 |
e.printStackTrace(); |
|
162 |
} catch (InitializeWriterException e) { |
|
163 |
NotificationManager.addError(e); |
|
164 |
} catch (CancelEditingTableException e) { |
|
165 |
NotificationManager.addError(e); |
|
166 |
} catch (StopWriterVisitorException e) { |
|
167 |
NotificationManager.addError(e); |
|
161 | 168 |
} |
162 | 169 |
return false; |
163 | 170 |
|
164 | 171 |
} |
165 | 172 |
|
166 | 173 |
|
167 |
private void saveLayer(FLyrVect layer) throws DriverException, |
|
168 |
EditionException { |
|
174 |
private void saveLayer(FLyrVect layer) throws ReadDriverException, InitializeWriterException, StopWriterVisitorException{ |
|
169 | 175 |
VectorialEditableAdapter vea = (VectorialEditableAdapter) layer |
170 | 176 |
.getSource(); |
171 | 177 |
|
... | ... | |
198 | 204 |
|
199 | 205 |
} |
200 | 206 |
|
201 |
private void cancelEdition(FLyrVect layer) throws IOException {
|
|
207 |
private void cancelEdition(FLyrVect layer) throws CancelEditingTableException {
|
|
202 | 208 |
com.iver.andami.ui.mdiManager.IWindow[] views = PluginServices |
203 | 209 |
.getMDIManager().getAllWindows(); |
204 | 210 |
for (int j = 0; j < views.length; j++) { |
Also available in: Unified diff