Skip to content

Conversation

@thatrajeevkr
Copy link
Contributor

Implemented file type filtering in Solution Explorer, allowing viewing of all project items (including Content, None, EmbeddedResource, FsLex and FsYacc files).

Changes:

  • Removed the hard-coded "Compile" filter which was hiding all non-source files.
  • Added smart filtering with ignore list for items that we don't want to see (AssemblyMetadata, COMReference, etc.). based of vscode-solution-explorer
  • Enhanced the File model to include itemType and metadata parameters for richer file information.
  • Added a file extension to item type mapping (.fs→Compile, .fsl→FsLex, .fsy→FsYacc, ....)
  • Created a buildTreeWithMetadata function to keep the MSBuild metadata.
  • Updated all File pattern Matches to be aware of the new model parameters.
  • Implemented the toModelWithMetadata method to build the tree with metadata.
  • This fixes the issue that we had where only Compile files were visible in Solution Explorer. Now we can see all project items, as declared in the .fsproj files.

@baronfel
Copy link
Contributor

baronfel commented Sep 5, 2025

Can you attach a screenshot so we can all go "oooh" and "ahhh" over your changes?

@thatrajeevkr
Copy link
Contributor Author

@TheAngryByrd @baronfel I add extra fix to make sure that it takes everything similar to the vs code explorer. Now it shows the .deps folder which contains the fsy and fsl files, if other folder needs to be added that, we could just change the isUnwanted to not include that and it will show up. I will paste in some changes showing how its working now

@thatrajeevkr
Copy link
Contributor Author

Previously the folder contents were not visible in our explorer, I used the code from the Fantomas to replicate the same issue they had and now its showing up in my explorer.
image
Previously this was not showing up in the explorer

@TheAngryByrd
Copy link
Member

Awesome work!

How does the right click menu look/work for non f# files?

@thatrajeevkr
Copy link
Contributor Author

@TheAngryByrd It works the same as the Solution Items folder we had previously.
image

@TheAngryByrd
Copy link
Member

TheAngryByrd commented Sep 6, 2025

Do those actions still work appropriately? I know we do xml manipulation on the server side for the project file which could have some weird side effects.

@thatrajeevkr
Copy link
Contributor Author

@TheAngryByrd the .deps folder is actually a generated folder, so it doesnt actually work..do you suggest anything?

@TheAngryByrd
Copy link
Member

We may need to apply the right click menu to files (and possibly only f# files). I'm not as familiar with this part of the code though so I don't have any immediate guidance on how to do it in the code.

@thatrajeevkr
Copy link
Contributor Author

So, what I have observed is that the .deps folder is created to cache project system and is generated by Ionide when you open the project. This is not technically required to be shown since its generated, but since VS code shows it, we have this fix to show it.
In that matter, This is similar to Solution Items we show, so this has the same functionality. Maybe we could gather requirements for the change you mentioned and then proceed with that. How do you think it should be taken up?

@TheAngryByrd
Copy link
Member

Yeah I think we can do that kind of stuff in a separate PR as long as the right-click menu doesn't damage somebody's project file.

@TheAngryByrd TheAngryByrd requested a review from Copilot September 8, 2025 14:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements comprehensive file type filtering for the Solution Explorer, expanding the view beyond just compiled source files to include all project items like Content, EmbeddedResource, FsLex, and FsYacc files. The change removes the restrictive "Compile" filter that was hiding non-source files and replaces it with smart filtering and file type mapping.

  • Removed hard-coded "Compile" filter that was hiding all non-source files
  • Added file extension to item type mapping for comprehensive file categorization
  • Enhanced project and solution exploration to include additional folders (bin, obj, packages, etc.)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@thatrajeevkr
Copy link
Contributor Author

Looks good now! Did a thorough check, asked Copilot as well to check the PR.

Copy link
Member

@TheAngryByrd TheAngryByrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@TheAngryByrd TheAngryByrd merged commit e06f52c into ionide:main Sep 9, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants