Project Property Page UI Extensibility
(Extracted from #6627)
The new Project Property Pages aim to be extensible to first and third parties. Some additional extension points are required to offer the full capabilities of the end-to-end system to extenders.
- [ ] Introduce MEF contracts and metadata for various types and extension points
- [x] Property editors (PR)
- As we open up to first and third parties, we'll see requests to show custom UI. Allowing composition of editors via MEF will unblock extenders.
- [x] Link actions handlers (PR)
- Currently we only allow hyperlinks for URLs. This will enable such hyperlinks (or other UI elements) to run custom code. Expected uses are showing the launch profile UI, and launching the VS installer to modify the set of installed target frameworks.
- [ ] Custom visibility condition functions (PR)
- As we open up to first and third parties, we'll see requests to extend the set of visibility condition functions. Allowing composition of functions via MEF will unblock extenders.
- [x] Property editors (PR)
- [ ] Make interfaces public
- Until the API is finalized, keep these extension point interfaces internal.
- [ ] Document extension points
- Some of this is covered by PR #6963
MEF components will need to be in global scope, as we won't have CPS on the client in Codespaces. There's no concept of UnconfiguredProject scope there, for example.
As our editor is not a MEF part itself, we'll need to explicitly import parts.
Something like:
// on main thread
IServiceProvider serviceProvider = ...;
IComponentModel componentModel = serviceProvider.GetService<SComponentModel, IComponentModel>();
IMyMefPart importedPart = componentModel.GetService<IMyMefPart>();
@drewnoakes this may be a good thing to revisit soon?
@kvenkatrajan specifically the function extensibility
Progress on property editor extensibility would be welcome. For example, the dialog raised via <ValueEditor EditorType="DirectoryPath" DisplayName="My Folder" /> leaves a lot to be desired.
@walterpg the Microsoft.VisualStudio.ProjectSystem.VS.PropertyPages.Designer.IPropertyEditor type (defined in CPS) is public, so as far as I know all the bits needed for custom editors are available today.