Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the "Format XAML on save" option is enabled, saving all (Ctrl+Shift+S) should only process unsaved modified XAML files #142

Closed
peterM opened this issue Feb 26, 2018 · 10 comments

Comments

@peterM
Copy link

peterM commented Feb 26, 2018

There is defect when i save all documents or use (Ctrl+Shift + S).
I expect to format only unsaved || opened documents and not all documents with *.xaml extension in solution.

@phraemer
Copy link

phraemer commented Mar 1, 2018

Yeah. This means I have to uninstall it. Too much noise otherwise.

@grochocki
Copy link
Contributor

grochocki commented Mar 1, 2018

This is definitely a pain point, though it can be easily mitigated in the short term by disabling the "Format XAML on save" option. There are a number of feature requests that should improve this experience overall:

I would consider this a bug on the "Format XAML on save" option (i.e., not intended behavior). Formatting all files is covered by #56.

Edit: Updated issue title for clarity.

@grochocki grochocki changed the title Format all on save When the "Format XAML on save" option is enabled, saving all (Ctrl+Shift+S) shoudl only process unsaved modified XAML files Mar 1, 2018
@grochocki grochocki changed the title When the "Format XAML on save" option is enabled, saving all (Ctrl+Shift+S) shoudl only process unsaved modified XAML files When the "Format XAML on save" option is enabled, saving all (Ctrl+Shift+S) should only process unsaved modified XAML files Mar 1, 2018
@peterM
Copy link
Author

peterM commented Mar 2, 2018

You could Merge at least new Filter from #144
x.Where(d=> d.Window !=null)
What will filter out documents what are not opened. And i think this additional Where() solve issue of this issue.

@grochocki
Copy link
Contributor

Fixed via #220 -- should only format opened documents now.

@grochocki grochocki added this to the 3.3 milestone Dec 22, 2019
@avdynut
Copy link

avdynut commented Apr 3, 2020

This issue occurs after I updated XamlStyler to version 3.2003.9.
Steps to reproduce:

  1. Open any .xaml file
  2. Click Save All button

Actual behavior: all xaml files in the solution are formatted

@LoriBru
Copy link

LoriBru commented Feb 1, 2022

Why is this closed? Apparently, it's still an issue in 2022.

@peterM
Copy link
Author

peterM commented Feb 1, 2022

Upper is my code what solved the problem in my case. :) .. if i remember correctly i cloned repo and built extension with my fix and stopped use official extension :)

@LoriBru
Copy link

LoriBru commented Feb 3, 2022

Thank you for the info :) I just wonder why this is not fixed as well in the official extension version!

@NicoVermeir
Copy link
Contributor

looks like we lost track of this one. thanks for the reminder folks, we'll look into it!
@peterM thanks for the suggestion, we'll look into your code snippet to see if it fixes this issue without raising additional ones :)

@jstevenson72
Copy link

Yes, I have to stop using this on my team. Because we have 20 xaml files, and and everytime someone asks to save all unsaved documents, this extension rewriting every Xaml file. Why is this issue closed? This should be re-opened since this has been occurring again since 2022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants