SideBySide2: Add range to PatchLineComment
Added a column named "range", a quadruple (start_line, start_character, end_line, end_character) that represents a comment range. Modified RPCs to include the range info. Updated schema to version 80. Change-Id: Idec295e15e3ab019ea04e4c2f3967eeecc0be55c
This commit is contained in:
		| @@ -84,12 +84,18 @@ class SaveDraft extends Handler<PatchLineComment> { | ||||
|             throw new IllegalStateException("Parent comment must be on same side"); | ||||
|           } | ||||
|         } | ||||
|         if (comment.getRange() != null | ||||
|             && comment.getLine() != comment.getRange().getEndLine()) { | ||||
|             throw new IllegalStateException( | ||||
|               "Range endLine must be on the same line as the comment"); | ||||
|         } | ||||
|  | ||||
|         final PatchLineComment nc = | ||||
|             new PatchLineComment(new PatchLineComment.Key(patchKey, ChangeUtil | ||||
|                 .messageUUID(db)), comment.getLine(), me, comment.getParentUuid()); | ||||
|         nc.setSide(comment.getSide()); | ||||
|         nc.setMessage(comment.getMessage()); | ||||
|         nc.setRange(comment.getRange()); | ||||
|         db.patchComments().insert(Collections.singleton(nc)); | ||||
|         db.commit(); | ||||
|         return nc; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Zhou
					Michael Zhou