project-system icon indicating copy to clipboard operation
project-system copied to clipboard

Project Property Page UI Extensibility

Open drewnoakes opened this issue 4 years ago • 3 comments

(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.
  • [ ] 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

drewnoakes avatar Feb 02 '21 03:02 drewnoakes

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 avatar Feb 03 '21 09:02 drewnoakes

@drewnoakes this may be a good thing to revisit soon?

adamint avatar Aug 08 '22 17:08 adamint

@kvenkatrajan specifically the function extensibility

adamint avatar Aug 16 '22 05:08 adamint

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 avatar Jan 05 '23 17:01 walterpg

@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.

drewnoakes avatar Jan 06 '23 10:01 drewnoakes