Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Implement "add new" and "rename" for solution folder files #4794

Merged
merged 8 commits into from May 16, 2018

Conversation

mhutch
Copy link
Member

@mhutch mhutch commented May 15, 2018

Fixes issue #4775 - Cannot add new file to solution items
Fixes issue #4774 - Cannot rename solution items

The new file dialog already saves the project, the
command handler doesn't need to
When renaming system files, select the filename without the
extension, as for project files
The starting value of the rename entry was the node name, but
that might not match the node label, so allow handlers
to customize it
The IFileItem.FileName API is actually a path, which
makes it pretty confusing to read code that uses it. Fix
this for SolutionFolderFileNode by implementing the
property explicitly and instead exposing Path and Name
properties, like SystemFile does.
@p-lad
Copy link

p-lad commented May 16, 2018

Hello,
Following is the status :-

Build Taken from :- https://devdiv.visualstudio.com/DevDiv/_build/index?buildId=1688171&tab=artifacts&_a=summary

Observations :-
i. When any item is added to solutions , we can now see the “Rename” option available and able to rename the solution items successfully.
ii. When we right click on the Solution , there is option "ADD NEW FILE" and on clicking we can add file to solution successfully.

Build Info :-
Visual Studio Enterprise 2017 for Mac (Preview) Version 7.6 Preview (7.6 build 808)
Mono 5.14.0.83 (2018-04/769481d834c) (64-bit)
Xamarin.Mac Version: 4.5.0.313 (Visual Studio Enterprise)
Xamarin.iOS Version: 11.11.0.313 (Visual Studio Enterprise)
Xamarin.Android Version: 8.3.99.12 (Visual Studio Enterprise)

have also marked following bugs as QA Approved :-
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/616402
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/616403

Screenshot link :- http://recordit.co/XGQMbb1coU

Hence marking this as “QA Approved ”

@slluis slluis merged commit b8a651d into master May 16, 2018
@slluis slluis deleted the solutionfile-add-rename branch May 16, 2018 09:05
protected void OnAddNewFiles ()

[CommandHandler (ProjectCommands.AddNewFiles)]
protected async void OnAddNewFiles ()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this need to be async?

/* [CommandHandler (ProjectCommands.AddNewFiles)]
protected void OnAddNewFiles ()
[CommandHandler (ProjectCommands.AddNewFiles)]
protected async void OnAddNewFiles ()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this need to be async?

Copy link
Member Author

Choose a reason for hiding this comment

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

So if there's an exception in the called async method, we get a callstack with caller info

Copy link
Contributor

Choose a reason for hiding this comment

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

There is no async method being called here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, during development this method was awaiting on solution save, but I moved that to the new file dialog for consistency with what happens with projects

@slluis slluis removed the qa-pending label Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants