Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Adding new reconciling strategy with Document Model

Hi All,

I am trying to see the possibility of adding new annotation on th CDT editor. I was going through the code to see how C++ indexer type problem was added to the source code. What I understood from the source code is as follows:

There are 2 reconcilation strategies added a) CReconcilingStrategy ( I think it takes care of finding the CPPASTProblem types in the code ) and b) CSpellingReconcilerStrategy ( That takes care of finding spelling related problems in the code)

Once these two strategies reconcile any change in the documnet model, and generate a list of problems ( of IProblem types), document model (CDocumentModel.java) is responsible for putting the markers at appropriate place.

please correct me if my understanding is wrong. Now according to my requirement , I want to have a mechanism, where any change in document model allows me to call my reconciler strategy, where I will go through the AST and prepare a list of violations problems ( Violations are not syntax problems, but represent breaking of those rules that must be followed, for example, if a memory resource is present in a class , say pointer, it should have assignment operator and copy constructor overloaded, etc ). For finding such problem, I need to go through AST and find the instances of such violations. 
   Will reconcilining strategy be a good point to look into this problem, and first of all, is above explained way of handing is suitable for this problem.

thanks a lot in advance.
regards
chinmay


--
That, detective, is the right question. Program terminated.

Back to the top