-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TemplateResult type to pass along creation results to caller
This change fixes PowerShell/vscode-powershell#390 which states that the New Project experience in VS Code doesn't work well with project paths which use characters like '~' to represent the home directory. This change causes the fully resolved DestinationPath of the template creation to be passed back to the editor so that it can be opened.
- Loading branch information
Showing
6 changed files
with
86 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
// | ||
|
||
namespace Microsoft.PowerShell.EditorServices.Templates | ||
{ | ||
/// <summary> | ||
/// Provides details about the result of the creation of a file | ||
/// or project from a template. | ||
/// </summary> | ||
public class TemplateResult | ||
{ | ||
/// <summary> | ||
/// Gets or sets a boolean which is true if creation was successful. | ||
/// </summary> | ||
public bool IsSuccess { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the template path which was used in creation. | ||
/// </summary> | ||
public string TemplatePath { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the destination path where the file (or files) were created. | ||
/// </summary> | ||
public string DestinationPath { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the array of file paths that were created. | ||
/// </summary> | ||
public string[] CreatedFiles { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the array of file paths that were updated. | ||
/// </summary> | ||
public string[] UpdatedFiles { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the list of modules that will need to be installed for | ||
/// the created file or project to be fully functional. | ||
/// </summary> | ||
public string[] MissingModules { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters