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

feat: When in DevTools using Copy Selector replace Clr Namespace with xmlns #470

Conversation

workgroupengineering
Copy link
Contributor

@workgroupengineering workgroupengineering commented Apr 18, 2024

Speed up writing a Style Selector.
When Copy Selector using [DevTools] treeview context menu, it put text like this in clipboard:

FluentAvalonia.UI.Controls.NavigationView#NavView.Store /template/ Avalonia.Controls.ScrollViewer#FooterItemsScrollViewer

Dependent on AvaloniaUI/Avalonia#14603
Fixes #448


namespace Avalonia.Ide.CompletionEngine.Parsing;

public record struct DevToolsSelectorInfo(Range ElementType, Range Namespace, Range AssemblyName = default)
Copy link
Member

Choose a reason for hiding this comment

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

It could a ref struct with Span/Memory instead as well. Since it's not stored anywhere outside of the same stack.
But range might be fine too, just adds too much of polyfills.

@@ -0,0 +1,39 @@
namespace System.Runtime.CompilerServices
{
internal static class RuntimeHelpers
Copy link
Member

Choose a reason for hiding this comment

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

These RuntimeHelpers are defined twice in the PR.

@maxkatz6 maxkatz6 enabled auto-merge May 13, 2024 14:45
@maxkatz6 maxkatz6 merged commit 41f4539 into AvaloniaUI:master May 13, 2024
2 checks passed
@workgroupengineering workgroupengineering deleted the features/Intellisense/Paste_Selector branch May 13, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DevTools] Copy Selector replace Clr Namespace with xmlns
2 participants