X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=src%2FLsp.vala;h=7288f72a255fc471a801e01054d27c840532a94b;hb=22be1768a48c8284ac63ad046a0038b814fde930;hp=1e6c4651dab3c49e2ff3529f09176cb4359787cb;hpb=6592bf8971e90981481c0191c3aa975e15bcc9f8;p=roobuilder diff --git a/src/Lsp.vala b/src/Lsp.vala index 1e6c4651d..7288f72a2 100644 --- a/src/Lsp.vala +++ b/src/Lsp.vala @@ -137,6 +137,9 @@ namespace Lsp { } public bool equal_to (Range other) { return this.to_string () == other.to_string (); } + public bool equals (Range o) { + return this.filename == o.filename && this.start == o.start && this.end == o.end; + } public int compare_to (Range other) { return start.compare_to (other.start); @@ -158,6 +161,7 @@ namespace Lsp { public bool contains (Position pos) { return start.compare_to (pos) <= 0 && pos.compare_to (end) <= 0; } + } public class Diagnostic : Object { @@ -204,6 +208,10 @@ namespace Lsp { private set {} } + public bool equals(Lsp.Diagnostic o) { + return this.range.equals(o.range) && this.severity == o.severity && this.message == o.message; + + } } /**