Gu.Localization icon indicating copy to clipboard operation
Gu.Localization copied to clipboard

Xaml analyzer + fix if possible

Open JohanLarsson opened this issue 6 years ago • 3 comments

Before:

<TextBlock Text ="One resource" />

After:

<TextBlock Text ="{l:static p:Resources.One_resource" />

@mgoertz-msft is there any hope for being able to do ^?

JohanLarsson avatar Apr 17 '18 18:04 JohanLarsson

@JohanLarsson Are you asking if there is hope to be able to create an analyzer + code fixer for XAML files that could do this?

If so, I'm afraid this won't be possible until we add full support for XAML to Roslyn so that you could write your own analyzers, use XAML syntax trees, etc. The current document analyzer we have is based in the Roslyn internal DocumentDiagnosticAnalyzer and is specific to the XAML Language Service in Visual Studio.

mgoertz-msft avatar Apr 18 '18 19:04 mgoertz-msft

Yes, that was my question, your name was suggested for who to ask so I pinged you here. Analyzers for xaml would be sweet.

JohanLarsson avatar Apr 18 '18 19:04 JohanLarsson

I agree, that would be sweet, and it's certainly something we are thinking about.

mgoertz-msft avatar Apr 18 '18 20:04 mgoertz-msft