Go to type declaration not working

Assume I have declared an enum Color in Color.h and class MyClass in MyClass.h which contains the member variable Color myColor.

In some .cpp file I have an instance of MyClass named myInstance (terrible names I know) and access the myColor variable, e.g.

`myInstance.myColor`

From JetBrains documentation it seems like I should be able to use "Go to Type Declaration" by Ctril-Shift-Clicking on "myColor" to open up the declaration of Color in Color.h- but nothing happens.

I can of course select "Go to Declarations" which opens the declaration of MyClass::myColor and select its Color type and click "Go to Declaration" again to open up Color.h, but that is much more cumbersome than I like.

So what's up with "Go to Type Declaration"? Am I misunderstanding where it can be used, is it some trick I don't see, or is it simply not working in CLion?

 

For the record, I am using CLION 2101.1.2. I also have Key Promoter X installed and it tells me that I should use the keystroke Ctrl-Shift-B for "Go to Type Declaration" (which also isn't working), so I am using the right command.

 

Please sign in to leave a comment.