Re: [Clirr-devel] Message framework
Status: Alpha
Brought to you by:
lkuehne
From: Simon K. <si...@ec...> - 2004-06-28 07:23:36
|
On Mon, 2004-06-28 at 19:01, Simon Kitching wrote: > Hi Lars, > > Ok, message framework all committed. Please have a look and let me know > what you think. > > I've only updated the MethodSetCheck class to use it, so that if there > are changes I don't need to redo/revert everything. If you like it, then > I will go ahead and convert the other check classes over. > > Sorry the commit to MethodSetCheck.java has 2 separate changes in it > (scopeSelector, checkVisibility and Message support). I don't have > internet access at home (too cheap to pay when I've got it for free at > work :-). So over a weekend I tend to sometimes end up implementing > several features, and they sometimes touch the same files. If we were > using a "distributed" version control system like "monotone", this > wouldn't be a problem... Just to state the obvious, the existance of this Message class with a unique number in each one allows us to make this kind of change to the report generators: public void reportDiff(ApiDifference difference) { ... Message m = difference.getMessage(); if (m != null) { out.print(" #"); out.print(m.getId()); } .... } resulting in this kind of output: INFO #7010: org.apache.commons.collections.BagUtils: Accessability of method 'private BagUtils()' has been increased from private to public in org.apache.commons.collections.BagUtils INFO #7011: org.apache.commons.collections.BagUtils: Method 'public org.apache.commons.collections.Bag transformedBag(org.apache.commons.collections.Bag, org.apache.commons.collections.Transformer)' has been added in org.apache.commons.collections.BagUtils Where the user can then look up 7010 and 7011 in the supplementary documentation. Or for HTML reports, we can just generate a link to: http://clirr.sourceforge.net/doc/message-info.html#{msgid} Regards, Simon |