Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Switch Header/Source command support for files with *.cc extension. #1341

Closed
photex opened this issue Dec 12, 2017 · 7 comments
Closed
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service

Comments

@photex
Copy link

photex commented Dec 12, 2017

Howdy!

I recently opened a project that used *.cc for c++ files and the Switch Header/Source command had no effect. Upon renaming one of the source files the command worked as expected.

Cheers!

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Dec 12, 2017

What is the extension of the header file? "*.cc" is supposed to work. We need more repro details. Does this repro for certain file names or for certain directory structures? What does the bottom right database icon say? Our system needs to have located the target file on disk and added it to our database before it can go to it. Also, if there's a red flame in the bottom right, the IntelliSense thread could be blocking the switching header.

@sean-mcmanus sean-mcmanus added bug Language Service more info needed The issue report is not actionable in its current state labels Dec 12, 2017
@photex
Copy link
Author

photex commented Dec 12, 2017

I've zipped up a setup that reproduces the problem for me.
blah.zip

As it is, if you open the folder and open foo.cc, pressing Alt+o won't have any effect. Rename it to foo.cpp and it'll work as expected.

Hope this helps.

@sean-mcmanus
Copy link
Collaborator

@photex Thanks a lot for the repro -- I'm hitting the problem now. This is strange. I'll investigate...

@sean-mcmanus sean-mcmanus removed the more info needed The issue report is not actionable in its current state label Dec 12, 2017
@sean-mcmanus sean-mcmanus added this to the January 2018 milestone Dec 12, 2017
@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Dec 12, 2017

Oh, it's because the header file has the hpp extension and the system is setup to only switch cc files to .hh or .h files. This decision was made before I joined so I'm not sure what the reasoning was. Is there a reason your source is .cc and your header is .hpp? It seems inconsistent.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Dec 12, 2017

We've changed it to switch from to any of .h/.hpp/.hxx/.hh from any of .c/.cpp/.cc/.cxx (not sure yet when the fix will be released). We eventually want to fix it to work on any extensions (I think another issue is tracking that).

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Dec 12, 2017
@photex
Copy link
Author

photex commented Dec 13, 2017

Awesome! Glad I could help.

I don't know why they were named that way. I think .h was reserved for C interfaces and the header had to be something different. .hpp seems to be the vernacular for c++ interfaces. .cc was kinda left field. :D

@sean-mcmanus
Copy link
Collaborator

Fixed with 0.14.5.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

2 participants