Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Codan LifeCycle?

Override these methods in your checker

	@Override
	public void before(IResource resource) {
		super.before(resource);
		System.err.println(resource);
	}
	public boolean enabledInContext(IResource res) {
		return true;
	}
	@Override
	public void after(IResource resource) {
		super.after(resource);
		System.err.println(resource);
	}
....


On Thu, May 5, 2011 at 4:58 PM, Alena Laskavaia
<elaskavaia.cdt@xxxxxxxxx> wrote:
> It is not an event it is callback - you need to override "before"
> method. I am not sure if you extend this checker
> it will be called on the project level though.
>
> On Thu, May 5, 2011 at 4:55 PM, Christopher Andrews
> <consultchris@xxxxxxxxx> wrote:
>> I'm sorry, I might have replied too quickly.
>>
>> I'm extending the AbstractIndexAstChecker and only see the initPreferences,
>> and no other events.
>>
>> When you say that "There is before and after callbacks in checker - they are
>> called for
>> each resource, including the top level one" The top level resource looks
>> promising. What is the name of this event?
>>
>> Thanks
>>
>> Chris
>>
>> On Thu, May 5, 2011 at 4:43 PM, Christopher Andrews <consultchris@xxxxxxxxx>
>> wrote:
>>>
>>>
>>> I'm looking for an event that would get raised before and after ALL
>>> resources have been processed.
>>>
>>> Chris
>>>
>>> On Thu, May 5, 2011 at 4:37 PM, Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx>
>>> wrote:
>>>>
>>>> Event raised to a checker?
>>>> There is before and after callbacks in checker - they are called for
>>>> each resource, including the top level one
>>>>
>>>> On Thu, May 5, 2011 at 4:03 PM, Christopher Andrews
>>>> <consultchris@xxxxxxxxx> wrote:
>>>> > Hi Alena,
>>>> > Leo is talking about the use case of running via a Menu. Leo's checker
>>>> > needs
>>>> > to run through all code in the project from start to finish.
>>>> >
>>>> > I don't know how checkers are invoked (Can someone point me to the
>>>> > location
>>>> > in Codan's source?), but what would be nice is if an event was raised
>>>> > to a
>>>> > checker before it was invoked and after it was invoked for all files.
>>>> >
>>>> > --
>>>> > Chris Andrews
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > -----Original Message-----
>>>> > From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>>>> > On
>>>> > Behalf Of Alena Laskavaia
>>>> > Sent: Thursday, May 05, 2011 2:40 PM
>>>> > To: CDT General developers list.
>>>> > Subject: Re: [cdt-dev] Codan LifeCycle?
>>>> >
>>>> >
>>>> >
>>>> > What scenario you are talking about? It runs as you type every few
>>>> > seconds,
>>>> > or it can run menu or with builder.
>>>> >
>>>> >
>>>> >
>>>> > On Thu, May 5, 2011 at 9:30 AM, Leo Tran <tran.leo@xxxxxxxxx> wrote:
>>>> >
>>>> >> Re Hi,
>>>> >
>>>> >>
>>>> >
>>>> >> Is there an event before/end or method before/after that I can
>>>> >
>>>> >> register/call when Codan finished so that I can do some post analysis.
>>>> >
>>>> >>
>>>> >
>>>> >> I have tried James's suggestion but the resource change event
>>>> >
>>>> >> generated too many events to be use in our large code base  >10K.
>>>> >
>>>> >>
>>>> >
>>>> >> Thank again,
>>>> >
>>>> >>
>>>> >
>>>> >>
>>>> >
>>>> >> On Thu, Apr 28, 2011 at 1:52 PM, James Blackburn
>>>> >
>>>> >> <jamesblackburn@xxxxxxxxx>
>>>> >
>>>> >> wrote:
>>>> >
>>>> >>>
>>>> >
>>>> >>>
>>>> >
>>>> >>> On 28 April 2011 18:43, Andrew Gvozdev <angvoz.dev@xxxxxxxxx> wrote:
>>>> >
>>>> >>>>
>>>> >
>>>> >>>> Codan creates permanent markers to display in Problems View. Those
>>>> >
>>>> >>>> markers I believe are stored in XML file somewhere in
>>>> >
>>>> >>>> .metadata/.plugins/
>>>> >
>>>> >>>
>>>> >
>>>> >>> Or just access them using core.resources API...
>>>> >
>>>> >>> You can register a resource change listener and your listener will
>>>> >
>>>> >>> get notified of marker changes.
>>>> >
>>>> >>> James
>>>> >
>>>> >>>
>>>> >
>>>> >>>>
>>>> >
>>>> >>>> Andrew
>>>> >
>>>> >>>>
>>>> >
>>>> >>>> On Thu, Apr 28, 2011 at 1:38 PM, Leo Tran <tran.leo@xxxxxxxxx>
>>>> >>>> wrote:
>>>> >
>>>> >>>>>
>>>> >
>>>> >>>>>
>>>> >
>>>> >>>>> Hi all,
>>>> >
>>>> >>>>>
>>>> >
>>>> >>>>> I would like to collect and write the errors/warning to a html file
>>>> >
>>>> >>>>> when Codan finished.
>>>> >
>>>> >>>>>
>>>> >
>>>> >>>>> Is there a method that Codan calls when Codan's checkers finished
>>>> >
>>>> >>>>> checking the code?
>>>> >
>>>> >>>>>
>>>> >
>>>> >>>>> How do I go about collect and write the errors/warning to a html
>>>> >
>>>> >>>>> file when Codan finished?
>>>> >
>>>> >>>>>
>>>> >
>>>> >>>>> Thank you,
>>>> >
>>>> >>>>> _______________________________________________
>>>> >
>>>> >>>>> cdt-dev mailing list
>>>> >
>>>> >>>>> cdt-dev@xxxxxxxxxxx
>>>> >
>>>> >>>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>> >
>>>> >>>>>
>>>> >
>>>> >>>>
>>>> >
>>>> >>>>
>>>> >
>>>> >>>> _______________________________________________
>>>> >
>>>> >>>> cdt-dev mailing list
>>>> >
>>>> >>>> cdt-dev@xxxxxxxxxxx
>>>> >
>>>> >>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>> >
>>>> >>>>
>>>> >
>>>> >>>
>>>> >
>>>> >>>
>>>> >
>>>> >>> _______________________________________________
>>>> >
>>>> >>> cdt-dev mailing list
>>>> >
>>>> >>> cdt-dev@xxxxxxxxxxx
>>>> >
>>>> >>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>> >
>>>> >>>
>>>> >
>>>> >>
>>>> >
>>>> >>
>>>> >
>>>> >> _______________________________________________
>>>> >
>>>> >> cdt-dev mailing list
>>>> >
>>>> >> cdt-dev@xxxxxxxxxxx
>>>> >
>>>> >> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>> >
>>>> >>
>>>> >
>>>> >>
>>>> >
>>>> > _______________________________________________
>>>> >
>>>> > cdt-dev mailing list
>>>> >
>>>> > cdt-dev@xxxxxxxxxxx
>>>> >
>>>> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>> >
>>>> > _______________________________________________
>>>> > cdt-dev mailing list
>>>> > cdt-dev@xxxxxxxxxxx
>>>> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>> >
>>>> >
>>>> _______________________________________________
>>>> cdt-dev mailing list
>>>> cdt-dev@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>
>>>
>>>
>>> --
>>> Chris Andrews
>>
>>
>>
>> --
>> Chris Andrews
>>
>


Back to the top