Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Getting the base location of a method

eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper class provides methods for finding and checking overrides.

-sergey

On Wed, Jul 29, 2009 at 2:50 AM, Francois Rigault <francois.rigault@xxxxxxxxxxx> wrote:
Hello.

I'm trying to use the amazing Codan to implement simple naming convention
on C++ code. I need the rule to apply on the _base_ method only. Overriden
method have no choice but to have the same name as the base method, and
the base method name may not be modifiable by the developer - that would
lead to many false positive.

So I have an IASTName for a non-private non-static method from a class
that publicly extends another class. I get multiple entries from the index
for its binding. In this case there is a possibility that this method
overrides one from a superclass.

What is the best way to know if this method in an override ?

Besides, if this knowledge could be extracted from the index, overriden
method could appear with a small arrow in the editor margin, like we have
on JDT - clicking on the arrow leads you to the superclass implementation.

Best regards

Francois

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


Back to the top