Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Codan Execution Listener

Hi Roberto

I don't think that extending CodanPartListener will do you any good. You would have to be able to replace the existing CodanPartListener and register your derived one instead. Furthermore, the CodanPartListener just schedules the job, therefore it only active at the beginning.

What exactly is it what you want to do while Codan is executing?

Regards
Thomas


-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Roberto Oliveira
Sent: Mittwoch, 12. März 2014 17:45
To: cdt-dev@xxxxxxxxxxx
Subject: Re: [cdt-dev] Codan Execution Listener

On 03/12/2014 01:00 PM, cdt-dev-request@xxxxxxxxxxx wrote:
> Send cdt-dev mailing list submissions to
> 	cdt-dev@xxxxxxxxxxx
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://dev.eclipse.org/mailman/listinfo/cdt-dev
> or, via email, send a message with subject or body 'help' to
> 	cdt-dev-request@xxxxxxxxxxx
>
> You can reach the person managing the list at
> 	cdt-dev-owner@xxxxxxxxxxx
>
> When replying, please edit your Subject line so it is more specific 
> than "Re: Contents of cdt-dev digest..."
>
>
> Today's Topics:
>
>     1. Re: Codan Execution Listener (Roberto Oliveira)
>     2. Re: Codan Execution Listener (Corbat Thomas)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 12 Mar 2014 10:47:01 -0300
> From: Roberto Oliveira <rdutra@xxxxxxxxxxxxxxxxxx>
> To: cdt-dev@xxxxxxxxxxx
> Subject: Re: [cdt-dev] Codan Execution Listener
> Message-ID: <53206555.2010207@xxxxxxxxxxxxxxxxxx>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 03/12/2014 06:01 AM, cdt-dev-request@xxxxxxxxxxx wrote:
>> Send cdt-dev mailing list submissions to
>> 	cdt-dev@xxxxxxxxxxx
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	https://dev.eclipse.org/mailman/listinfo/cdt-dev
>> or, via email, send a message with subject or body 'help' to
>> 	cdt-dev-request@xxxxxxxxxxx
>>
>> You can reach the person managing the list at
>> 	cdt-dev-owner@xxxxxxxxxxx
>>
>> When replying, please edit your Subject line so it is more specific 
>> than "Re: Contents of cdt-dev digest..."
>>
>>
>> Today's Topics:
>>
>>      1. Re: How to add Keyword to CDT Parser (Anitha)
>>      2. Re: Codan Execution Listener (Roberto Oliveira)
>>      3. Re: CDT multicore (Maherzia BELAAZI)
>>      4. Re: How to add Keyword to CDT Parser (Sebastian Wagner)
>>
>>
>> ---------------------------------------------------------------------
>> -
>>
>> Message: 1
>> Date: Tue, 11 Mar 2014 23:24:21 -0700 (PDT)
>> From: Anitha <y_anitha@xxxxxxxxx>
>> To: cdt-dev@xxxxxxxxxxx
>> Subject: Re: [cdt-dev] How to add Keyword to CDT Parser
>> Message-ID: <1394605461772-166059.post@xxxxxxxxxxxxx>
>> Content-Type: text/plain; charset=us-ascii
>>
>> Hi Sebastian,
>>
>> I have the similar setup but still not working. So here is what i am 
>> suspecting could be different.
>>
>> 1. What is the difference between IToken and IGCCToken? My Keywords 
>> are something completely different from what C/C++ offers. So do i 
>> need to add a token first and then add that keyword to it? I have a 
>> keyword which lets me pass variable number of parameters to my 
>> function call if my function is defined with that keyword slightly different from the concept of Ellipses.
>>
>> 2. I saw that you also have a class for IParserExtensionConfiguration 
>> and IScanner. What are you doing in those classes? I do not have 
>> their implementations right now. Do you think adding that will make a difference?
>>
>> Thanks once again.
>>
>> Regards,
>> Anitha
>>
>>
>>
>> --
>> View this message in context: 
>> http://eclipse.1072660.n5.nabble.com/How-to-add-Keyword-to-CDT-Parser
>> -tp166002p166059.html Sent from the Eclipse CDT - Development mailing 
>> list archive at Nabble.com.
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Wed, 12 Mar 2014 06:52:26 +0000
>> From: Corbat Thomas <tcorbat@xxxxxx>
>> To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
>> Subject: Re: [cdt-dev] Codan Execution Listener
>> Message-ID: 
>> <5A243FA6D0810049ACF5A7D66C0A5A8685F45A93@xxxxxxxxxxxxxxx>
>> Content-Type: text/plain; charset="iso-8859-1"
> Hi Thomas,
> 	
> It is not really this what I am looking for. I already used this class AbstractIndexAstChecker to create some customized checkers.
>
> What I am looking for is if there is a way to know when Codan executes 
> in the source code (A listener or something like that). So when it executes, I can do some action in my own plugin (other plugin).
>
> Thanks.
>
>
>> Hi Roberto
>>
>> There is an extension point for Codan checkers, if that's what you're looking for. It requires you to supply an IChecker (see package org.eclipse.cdt.codan.core), which gets executed while Codan is active (depending on the configuration). There are already existing implementations of base classes for checkers you can use, e.g. AbstractIndexAstChecker. This depends on your needs.
>>
>> Have you been looking for something like that?
>>
>> Regards
>> Thomas
>>
>>
>> -----Original Message-----
>> From: cdt-dev-bounces@xxxxxxxxxxx 
>> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Roberto Oliveira
>> Sent: Dienstag, 11. M?rz 2014 19:52
>> To: cdt-dev@xxxxxxxxxxx
>> Subject: [cdt-dev] Codan Execution Listener
>>
>>
>> Is there any class or method in the Codan API  that can listen to Codan verification in the source code ?
>>
>> For example: If I want that my eclipse plugin do some action when Codan executes (that can be, for example, when the user type or save a file)... Is there anyway to do that?
>>
>> Thanks.
>>
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Wed, 12 Mar 2014 08:12:11 +0100
>> From: Maherzia BELAAZI <maherzia.belaazi@xxxxxx>
>> To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>,	"'Chonduy
>> 	Nguyen'" <chonduy9@xxxxxxxxx>
>> Subject: Re: [cdt-dev] CDT multicore
>> Message-ID:
>> 	<6DB94C719BBB6445988AC92B2CABD98C015CE8826652@xxxxxxxxxxxxxxxxxx>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Hello Marc,
>>
>> I have the same need as Chonduy. Thanks for you explanation.
>> Just to be sure :
>>
>> *         CDI doesn't support multicore ; we must switch/extend to DSF in order to get multicore features?
>>
>> *         The Multicore visualizer, in this case, is not supporting CDI debugger ?
>>
>> Thanks in advance,
>> Maherzia
>>
>>
>>
>> From: cdt-dev-bounces@xxxxxxxxxxx 
>> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marc Khouzam
>> Sent: mardi 11 mars 2014 21:16
>> To: 'Chonduy Nguyen'; 'cdt-dev@xxxxxxxxxxx'
>> Subject: Re: [cdt-dev] CDT multicore
>>
>> Hi,
>>
>> that is a pretty wide question :)  The good news is that many people have done this so you may be able to find help.
>>
>> First, most, if not all, of the work done on CDT Debugging these days 
>> is on the DSF framework instead of CDI, so you might want to look 
>> into that (google around for info).  Also, there is an active effort 
>> to improve multicore debugging for CDT through the Multicore Debug 
>> workgroup.  You might consider calling in to collaborate and progress 
>> forward.  Info can be found here: 
>> https://wiki.eclipse.org/CDT/MultiCoreDebugWorkingGroup
>>
>> CDT/DSF has an integration of GDB which is used by many or extended 
>> to suite their multicore needs.  The code is the best documentation 
>> here, but we do have a page describing how to start extending it: 
>> https://wiki.eclipse.org/CDT/cdt-debug-dsf-gdb-extensibility
>>
>> I hope this gives you a starting point.
>>
>> Marc
>>
>>
>> From: cdt-dev-bounces@xxxxxxxxxxx<mailto:cdt-dev-bounces@xxxxxxxxxxx> 
>> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Chonduy Nguyen
>> Sent: Tuesday, March 11, 2014 4:04 PM
>> To: cdt-dev@xxxxxxxxxxx<mailto:cdt-dev@xxxxxxxxxxx>
>> Subject: [cdt-dev] CDT multicore
>>
>> Hi All
>>
>> I currently have an application debugger using CDT with single view/ CDI. If I want to extend it to support CDT multicore, what are the steps that I need to do? any tutorial document for this?
>> Please help
>>
>> Thank you
>> ChonDuy
>>
>> -------------- next part -------------- An HTML attachment was 
>> scrubbed...
>> URL: 
>> <https://dev.eclipse.org/mailman/private/cdt-dev/attachments/20140312
>> /68ccf6f2/attachment.html>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Wed, 12 Mar 2014 10:00:54 +0100
>> From: Sebastian Wagner <se.wagner@xxxxxxxxxxx>
>> To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
>> Subject: Re: [cdt-dev] How to add Keyword to CDT Parser
>> Message-ID: <DUB121-W118739842D681EAF0EB24CEC760@xxxxxxx>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi Anitha,
>>
>> what I did is just to add some keywords to have them highlighted in the editor. In addition I added those macros to replace them by an empy string for the parser to avoid errors.
>> If you want to add new keywords you also need to adapt the parser, so it's much more effort to do this.
>>
>> To be honest I just copied how it was done for the GCC and implemented exactly the same thing with small modifications, like the specific keywords. If you need deeper information I guess you need to ask again to other developers here.
>>
>> best regards, Sebastian
>>
>>
>>> Date: Tue, 11 Mar 2014 23:24:21 -0700
>>> From: y_anitha@xxxxxxxxx
>>> To: cdt-dev@xxxxxxxxxxx
>>> Subject: Re: [cdt-dev] How to add Keyword to CDT Parser
>>>
>>> Hi Sebastian,
>>>
>>> I have the similar setup but still not working. So here is what i am 
>>> suspecting could be different.
>>>
>>> 1. What is the difference between IToken and IGCCToken? My Keywords 
>>> are something completely different from what C/C++ offers. So do i 
>>> need to add a token first and then add that keyword to it? I have a 
>>> keyword which lets me pass variable number of parameters to my 
>>> function call if my function is defined with that keyword slightly different from the concept of Ellipses.
>>>
>>> 2. I saw that you also have a class for 
>>> IParserExtensionConfiguration and IScanner. What are you doing in 
>>> those classes? I do not have their implementations right now. Do you think adding that will make a difference?
>>>
>>> Thanks once again.
>>>
>>> Regards,
>>> Anitha
>>>
>>>
>>>
>>> --
>>> View this message in context: 
>>> http://eclipse.1072660.n5.nabble.com/How-to-add-Keyword-to-CDT-Parse
>>> r-tp166002p166059.html Sent from the Eclipse CDT - Development 
>>> mailing list archive at Nabble.com.
>>> _______________________________________________
>>> cdt-dev mailing list
>>> cdt-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>    		 	   		
>> -------------- next part -------------- An HTML attachment was 
>> scrubbed...
>> URL: 
>> <https://dev.eclipse.org/mailman/private/cdt-dev/attachments/20140312
>> /7fc4f687/attachment.html>
>>
>> ------------------------------
>>
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>
>>
>> End of cdt-dev Digest, Vol 109, Issue 22
>> ****************************************
>>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 12 Mar 2014 14:54:51 +0000
> From: Corbat Thomas <tcorbat@xxxxxx>
> To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
> Subject: Re: [cdt-dev] Codan Execution Listener
> Message-ID: <5A243FA6D0810049ACF5A7D66C0A5A8685F45BC3@xxxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="iso-8859-1"

Hi Thomas

In the CDT package "org.eclipse.cdt.codan.ui.cxx" there is a class called "CodanPartListener" that listen to the Editor. But this class is declared as public, so its available just inside this package.

I am guessing if I could extend this class I could get when Codan executes.

Thanks

>
> Hi Roberto
>
> Ok, then I didn't get your intention. I don't know of any neat access to the begin/end information of the CodanRunner. There's no interface for callback or any kind of observer I'm aware of. You could try to get the information out of the JobManager, but that's unlikely to become a nifty solution.
>
> Regards
> Thomas
>
>
>
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] 
> On Behalf Of Roberto Oliveira
> Sent: Mittwoch, 12. M?rz 2014 14:47
> To: cdt-dev@xxxxxxxxxxx
> Subject: Re: [cdt-dev] Codan Execution Listener
>
> Hi Thomas,
> 	
> It is not really this what I am looking for. I already used this class AbstractIndexAstChecker to create some customized checkers.
>
> What I am looking for is if there is a way to know when Codan executes in the source code (A listener or something like that). So when it executes, I can do some action in my own plugin (other plugin).
>
> Thanks.
>
>
>> Hi Roberto
>>
>> There is an extension point for Codan checkers, if that's what you're looking for. It requires you to supply an IChecker (see package org.eclipse.cdt.codan.core), which gets executed while Codan is active (depending on the configuration). There are already existing implementations of base classes for checkers you can use, e.g. AbstractIndexAstChecker. This depends on your needs.
>>
>> Have you been looking for something like that?
>>
>> Regards
>> Thomas
>>
>>
>> -----Original Message-----
>> From: cdt-dev-bounces@xxxxxxxxxxx 
>> [mailto:cdt-dev-bounces@xxxxxxxxxxx]
>> On Behalf Of Roberto Oliveira
>> Sent: Dienstag, 11. M?rz 2014 19:52
>> To: cdt-dev@xxxxxxxxxxx
>> Subject: [cdt-dev] Codan Execution Listener
>>
>>
>> Is there any class or method in the Codan API  that can listen to Codan verification in the source code ?
>>
>> For example: If I want that my eclipse plugin do some action when Codan executes (that can be, for example, when the user type or save a file)... Is there anyway to do that?
>>
>> Thanks.
>>
>> _______________________________________________
>> 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
>
>
> End of cdt-dev Digest, Vol 109, Issue 24
> ****************************************
>

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top