Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How to identify a class in a *.cpp file?

Do you have any idea when this is gona make it to the full version?

On Wed, Jun 10, 2009 at 9:55 AM, Elena Laskavaia <elaskavaia@xxxxxxx> wrote:
You cannot run it from the tool yet. You have to check out code from CVS and code has examples. You can compile them and run dev version which would have it enabled.

Fedja Jeleskovic wrote:
Hi Elena,

The Wiki link that you supplied below doesn't specify which version of CDT this is going to work with! I am using CDT 5.0.2.200902130801 and I can't find the option to Run Code Analysis. What am I missing?

Thanks!


Fedja


On Tue, Jun 9, 2009 at 4:37 PM, Elena Laskavaia <elaskavaia@xxxxxxx <mailto:elaskavaia@xxxxxxx>> wrote:

   Static Analysis framework with some sample checkers, including ones
   that check some class properties can be checked out from CDT repository
   at dev.eclipse.org:/cvsroot/tools/org.eclipse.cdt/codan
   See more details in
   http://wiki.eclipse.org/CDT/designs/StaticAnalysis

   Qi WeiSong wrote:

       *_Hello,  _all:

       I am new to the CDT, and right now trying to develop a plug in
       to do a static analysis for our c++ source code. I want to find
       out the class name in the *.cpp file. However, I don't find any
       suitable API to do this. Can someone tell me which API i should
       use and how I should  do it? I have made a solution in a
       different way as following. Please help! thank you so much!


       public void analyze(AnalysisHistory history) {
              CodeReviewResource resource =
       (CodeReviewResource)getProvider().getProperty(
                      history.getHistoryId(),
       CodeReviewProvider.RESOURCE_PROPERTY);
              List<IASTNode> tUnitList = resource.getTypedNodeList(
                      resource.getResourceCompUnit(),
       CodeReviewVisitor.TYPE_IASTDeclaration);
                    for(IASTNode fileNode:tUnitList){
                      //psudo code
                      for each node, call the getRawSignature();
                      find out the class  name by checking the string
       got from getRawSignature().
              }
          }*
       --        Best Regards,
       WeiSong


       ------------------------------------------------------------------------

       _______________________________________________
       cdt-dev mailing list
       cdt-dev@xxxxxxxxxxx <mailto:cdt-dev@xxxxxxxxxxx>

       https://dev.eclipse.org/mailman/listinfo/cdt-dev

   _______________________________________________
   cdt-dev mailing list
   cdt-dev@xxxxxxxxxxx <mailto: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


Back to the top