-
Notifications
You must be signed in to change notification settings - Fork 31
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
CppHelper.SourcePattern is very constraining for non-"all in one folder" source layouts #45
Comments
I have same problem when work with unreal engine project |
I'm not a typescript expert, nor have I ever created a VS Code extension, so I'm not familiar with the process of compiling this repository into a usable extension. That being said, I've looked into the source code a bit, and it looks like in Helpers.ts, there's an openSourceFile() function which grabs the current file and attempts to find the match with a simple replacement. I believe if you swap the fs.existsSync() with some sort of globbing, that would give you the wildcard functionality, and make this extension 1000x more useful for Unreal projects. With enough poking around, I think I could figure out how to handle this, but if someone with a bit more expertise in this area could help, I would be forever grateful. |
Another possibility: What if, in the settings, we could specify replacement pairs, e.g. |
Alright, I toyed around with it a bit last night and this morning, and have submitted a pull request: |
@RoyAwesome Maybe something like this can fix your issue: "CppHelper.FindReplaceStrings": [
{
"find": "/public",
"replace": "/private"
}
], |
I'm not a fan of the traditional 'all files in one folder' approach to C++ development, and I often create folders in my source tree for different logical components, ie:
As far as I can tell, I can't pass regex paths or any other mechanism to have this plugin search for the proper source files when creating an implementation. I can work around this by adding the folder structure to the plugin, but I often create new folders for different logical parts of my codebase and modifying the search paths every time I decide to add or rename a folder is very tedious.
It would be nice to specify a path like "private/**/{file}.cpp", and have the plugin search through my paths to find the source file. It may also be helpful to be able to walk up the directory tree any number of folders to a given folder name, since I sometimes go 2 or 3 deep in folders.
The text was updated successfully, but these errors were encountered: