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

Feature Request: Add option to make filters match file system path #4

Open
Grifplex opened this issue Oct 30, 2019 · 1 comment
Open

Comments

@Grifplex
Copy link

Installed product versions

  • Visual Studio: 2015, 2017, 2019 Enterprise
  • This extension: 1.0.13

Description

Thank you so much for this Awesome extension that should be the way Visual Studio works!
A colleague likes to use the "Show All Files" function of the Solution Explorer. When he add files to the project they are added without a filter specified. Could this extension add missing filter folders to match the path on disk?

Steps to recreate

  1. Create a project
  2. Select "Show All Files" in Solution Explorer
  3. Add files in sub-folders
  4. Save project

Current behavior

Filters of files added have missing filter paths i.e.:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <ClCompile Include="src\Main.cpp" />
    <ClCompile Include="src\Class1\Class1.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="src\Main.hpp" />
    <ClInclude Include="src\Class1\Class1.hpp />
  </ItemGroup>
</Project>

Expected behavior

Add missing Filters for the added files, i.e.:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <ClCompile Include="src\Main.cpp">
      <Filter>src</Filter>
    </ClCompile>
    <ClCompile Include="src\Class1\Class1.cpp">
      <Filter>src\Class1</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="src\Main.hpp">
      <Filter>src</Filter>
    </ClInclude>
    <ClInclude Include="src\Class1\Class1.hpp">
      <Filter>src\Class1</Filter>
    </ClInclude>
  <ItemGroup>
    <Filter Include="src" />
    <Filter Include="src\Class1" />
  </ItemGroup>
@sandercox
Copy link
Owner

Thank you for your kind words. I like the idea, for some reason every once in a while a file in our project gets 'corrupted' this way too!

If adding files is an issue for your colleague he might also be interested in my other plugin: AddExistingItemInVirtualFolder for when solutions and projects are not at the base level of your code.

But as long as he remains working in the "Show All Files" view that probably doesn't help.

Not sure when I can commit to adding this so no guarantees when it will be in there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants