Changeset 8919 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2015-10-20T16:49:10+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r8856 r8919 27 27 import org.openstreetmap.josm.command.SequenceCommand; 28 28 import org.openstreetmap.josm.corrector.ReverseWayTagCorrector; 29 import org.openstreetmap.josm.corrector.UserCancelException;30 29 import org.openstreetmap.josm.data.osm.Node; 31 30 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 39 38 import org.openstreetmap.josm.tools.Pair; 40 39 import org.openstreetmap.josm.tools.Shortcut; 40 import org.openstreetmap.josm.tools.UserCancelException; 41 41 42 42 /** -
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r8870 r8919 30 30 import org.openstreetmap.josm.command.DeleteCommand; 31 31 import org.openstreetmap.josm.command.SequenceCommand; 32 import org.openstreetmap.josm.corrector.UserCancelException;33 32 import org.openstreetmap.josm.data.UndoRedoHandler; 34 33 import org.openstreetmap.josm.data.coor.EastNorth; … … 46 45 import org.openstreetmap.josm.tools.Pair; 47 46 import org.openstreetmap.josm.tools.Shortcut; 47 import org.openstreetmap.josm.tools.UserCancelException; 48 48 import org.openstreetmap.josm.tools.Utils; 49 49 -
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r8513 r8919 24 24 import org.openstreetmap.josm.command.DeleteCommand; 25 25 import org.openstreetmap.josm.command.SequenceCommand; 26 import org.openstreetmap.josm.corrector.UserCancelException;27 26 import org.openstreetmap.josm.data.coor.EastNorth; 28 27 import org.openstreetmap.josm.data.coor.LatLon; … … 40 39 import org.openstreetmap.josm.tools.ImageProvider; 41 40 import org.openstreetmap.josm.tools.Shortcut; 41 import org.openstreetmap.josm.tools.UserCancelException; 42 42 43 43 /** -
trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
r8855 r8919 21 21 import org.openstreetmap.josm.corrector.ReverseWayNoTagCorrector; 22 22 import org.openstreetmap.josm.corrector.ReverseWayTagCorrector; 23 import org.openstreetmap.josm.corrector.UserCancelException;24 23 import org.openstreetmap.josm.data.osm.Node; 25 24 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 27 26 import org.openstreetmap.josm.gui.Notification; 28 27 import org.openstreetmap.josm.tools.Shortcut; 28 import org.openstreetmap.josm.tools.UserCancelException; 29 29 import org.openstreetmap.josm.tools.Utils; 30 30 -
trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
r8918 r8919 41 41 import org.openstreetmap.josm.tools.GBC; 42 42 import org.openstreetmap.josm.tools.MultiMap; 43 import org.openstreetmap.josm.tools.UserCancelException; 43 44 import org.openstreetmap.josm.tools.Utils; 44 45 import org.openstreetmap.josm.tools.WindowGeometry; … … 66 67 try { 67 68 saveSession(); 68 } catch ( CancelException ignore) {69 } catch (UserCancelException ignore) { 69 70 if (Main.isTraceEnabled()) { 70 71 Main.trace(ignore.getMessage()); … … 74 75 75 76 /** 76 * Denotes that the user has cancelled the save process. 77 * Attempts to save the session. 78 * @throws UserCancelException when the user has cancelled the save process. 77 79 * @since 8913 78 80 */ 79 public static class CancelException extends Exception { 80 } 81 82 /** 83 * Attempts to save the session. 84 * @throws CancelException when the user has cancelled the save process. 85 * @since 8913 86 */ 87 public void saveSession() throws CancelException { 81 public void saveSession() throws UserCancelException { 88 82 if (!isEnabled()) { 89 83 return; … … 93 87 dlg.showDialog(); 94 88 if (dlg.getValue() != 1) { 95 throw new CancelException();89 throw new UserCancelException(); 96 90 } 97 91 … … 118 112 119 113 if (fc == null) { 120 throw new CancelException();114 throw new UserCancelException(); 121 115 } 122 116 … … 142 136 file = new File(file.getPath() + (zip ? ".joz" : ".jos")); 143 137 if (!SaveActionBase.confirmOverwrite(file)) { 144 throw new CancelException();138 throw new UserCancelException(); 145 139 } 146 140 }
Note:
See TracChangeset
for help on using the changeset viewer.