Reputation: 25
I have multiple projects where I generate classes programmatically, but sometimes they are just base classes (contains only the build information) extended by other classes for further use. I want to exclude them from PhpStorm index.
Is there any way to do it with any comment / custom PHPDoc / other stuff? I can't do and don't want at all to do by myself in all project every time with the folder right click option. Because of they are auto generated, also not a practical solution if I do it by hand.
Upvotes: 0
Views: 75
Reputation: 637
As far as I know, this might be your only way to do it programaticaly
Update your script that generates them to also add their entries to
./.idea/<project_name.iml>
- it is just an xml file
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/<target_dir_path>" />
<!-- ... -->
</content>
</component>
Upvotes: 1
Reputation: 3557
You can't do that using comments or other in-editor features, but you can add them to "Ignored Files and Folders" list at File | Settings (Preferences on Mac) | Editor | File Types, if they have some common naming pattern.
Upvotes: 1