Dmitry Yudakov
Dmitry Yudakov

Reputation: 15734

C++ IDE for Linux with smart reference searching

Is there an IDE supporting C++ with REALLY smart searching of references? By 'reference' I mean usage of a class (or its member), variable, function in the whole Project or Workspace.

There's lots of IDE providing it. Some of them seem just to search for the text with same name giving lots of stuff, others are smarter and check the context (like class boundaries, namespace) but aren't accurate enough.

The best I've tried so far was Visual SlickEdit, but still there's more to wish.

class C1
{
    int foo;
};
class C2
{
    int foo;
};

For example in this situation when searching for C1::foo references I DON'T want C2::foo to be shown too.

So, is there an IDE that would be so smart?

Edit2

10x everybody for the answers so far.

I tried Eclipse, reference searching seems relatively good, but it takes it 20 minutes to index medium size project and 4 times of 5 it runs out of memory and crashes. I tried increasing it and some other advice and it got a little better, but still quite slow and annoying with these crashes.

I tried KDevelop3, but the feature mentioned in this question is not very advanced - seems to be just very advanced grep based text searching.

Edit4

KDevelop4 - I tried to make it work, but latest beta it's quite unusable for custom makefile projects, I was unable to do anything with it.

Edit5
I was surprised, but QT Creator did really well in my tests. It doesn't seem to create some tag/index files, but somehow manages to show very precisely the usage of variable/functions/classes. Unfortunately it seems to not work very correctly with templates, when following definitions of functions.

None of the mentioned IDEs could compete Visual SlickEdit in working with references, virtual functions, etc. QT Creator was the closest though, so I will choose it as an answer to my question.

Upvotes: 6

Views: 1442

Answers (7)

Xolve
Xolve

Reputation: 23200

Did you ever try Netbeans. Close competitor of Eclipse it has all its feature like web development, mobile application ide, plugins to almost allow anything to do. All this with lower CPU and memory footprint. And it does resolve the name correctly.

Upvotes: 1

Kangkan
Kangkan

Reputation: 15571

You can look at CodeBlocks [http://www.codeblocks.org/]. I just started using it, but not tested for your requirement. So I am not claiming 10X now. But you can give it a try. Its open source and good one.

Upvotes: 0

Sharique
Sharique

Reputation: 4219

I think Qt-Creator can help you. There few new features added in new preview 2.0.

Upvotes: 2

Anon
Anon

Reputation: 1

You have to try KDevelop 4, not the old one.

Upvotes: 0

hlovdal
hlovdal

Reputation: 28198

I have not used KDevelop myself, but I get the impression that it does some serious parsing of the source code and is able to access source code information though the editor . It has at least some advanced code assistant functionality.

Upvotes: 0

Sebastian
Sebastian

Reputation: 4950

No and I don't think we will ever see implementations that are as good as those in C# or Java editors for two reasons:

1) the preprocessor:

#ifdef _DEBUG
#define FOO(x) C1(x).foo
#else
#define FOO(x) C2(x).foo
#endif

2) templates:

template<class C> void Method(C const& c) {
    printf("%d", c.foo);
}

In both cases it is hard to determine which class is actually referenced.

Upvotes: 2

Adrian F&#226;ciu
Adrian F&#226;ciu

Reputation: 12552

I think that you could use Eclipse , mainly i think that it will be able to do what you want, or nearly enough. Also here's a brief description of it's search options.

Upvotes: 3

Related Questions