Changeset 10134 in josm for trunk/src/org/openstreetmap/josm/data/osm/NoteData.java
- Timestamp:
- 2016-04-10T16:57:50+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/NoteData.java
r9213 r10134 46 46 return -1; 47 47 } 48 if (n1.getState() == State. closed && n2.getState() == State.open) {48 if (n1.getState() == State.CLOSED && n2.getState() == State.OPEN) { 49 49 return 1; 50 50 } 51 if (n1.getState() == State. open && n2.getState() == State.closed) {51 if (n1.getState() == State.OPEN && n2.getState() == State.CLOSED) { 52 52 return -1; 53 53 } … … 200 200 Note note = new Note(location); 201 201 note.setCreatedAt(new Date()); 202 note.setState(State. open);202 note.setState(State.OPEN); 203 203 note.setId(newNoteId--); 204 NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action. opened, true);204 NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.OPENED, true); 205 205 note.addComment(comment); 206 206 if (Main.isDebugEnabled()) { … … 220 220 throw new IllegalArgumentException("Note to modify must be in layer"); 221 221 } 222 if (note.getState() == State. closed) {222 if (note.getState() == State.CLOSED) { 223 223 throw new IllegalStateException("Cannot add a comment to a closed note"); 224 224 } … … 226 226 Main.debug("Adding comment to note {0}: {1}", note.getId(), text); 227 227 } 228 NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action. commented, true);228 NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.COMMENTED, true); 229 229 note.addComment(comment); 230 230 dataUpdated(); … … 240 240 throw new IllegalArgumentException("Note to close must be in layer"); 241 241 } 242 if (note.getState() != State. open) {242 if (note.getState() != State.OPEN) { 243 243 throw new IllegalStateException("Cannot close a note that isn't open"); 244 244 } … … 246 246 Main.debug("closing note {0} with comment: {1}", note.getId(), text); 247 247 } 248 NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action. closed, true);248 NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.CLOSED, true); 249 249 note.addComment(comment); 250 note.setState(State. closed);250 note.setState(State.CLOSED); 251 251 note.setClosedAt(new Date()); 252 252 dataUpdated(); … … 262 262 throw new IllegalArgumentException("Note to reopen must be in layer"); 263 263 } 264 if (note.getState() != State. closed) {264 if (note.getState() != State.CLOSED) { 265 265 throw new IllegalStateException("Cannot reopen a note that isn't closed"); 266 266 } … … 268 268 Main.debug("reopening note {0} with comment: {1}", note.getId(), text); 269 269 } 270 NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action. reopened, true);270 NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.REOPENED, true); 271 271 note.addComment(comment); 272 note.setState(State. open);272 note.setState(State.OPEN); 273 273 dataUpdated(); 274 274 }
Note:
See TracChangeset
for help on using the changeset viewer.