-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support Community Toolkit MVVM Attributes #266
Comments
I am afraid this will slow down the syntax highlighter a bit. However, on Super Quick Info and the symbol tool tip for those annotated fields, you can read the |
Thanks for this comprehensive explanation. I suppose, 99% of the fields won't have any custom attributes at all, so the performance overhead will mostly come down to the attribute check only. But OK, at least this will remain and will affect performance. |
Yes. Theoretically it is not difficult to implement at all. However, the logic will affect ALL symbols being highlighted.
If "regex pattern enabled" highlight is to be implemented, for instance, you may want only private instance fields with a prefix " The code logic will become complicated. The current implementation in the step 4 does not have associated concept for compound sematic aspects such as "private static", "sealed override", etc. It once met with a member or type which is "private", it yields a "C#: Private member" tag, and when it later finds that member or type is "static", it yields another "C#: Static member" tag. So, if private instance fields with a prefix "m" to be tagged with "My Style 1" is to be implemented, we have to rewrite the logic of the tagger to compare with compound aspects. If the "Regex pattern enabled" highlight does not cooperate with the aforementioned sematic aspects, the code logic will be much simpler. However, each token will be examined by the regular expressions, which may be a little slow, I am afraid. |
The next version will allow you to do this by specifying regular expressions with matched tags. |
Hi, I've just uploaded a new beta version which allows you define regular expressions to highlight your code. The detail of the mechanism can be read in the Wiki page here: https://github.com/wmjordan/Codist/wiki/ClassificationTypes.json-and-Codist.ct.json |
The new feature is not yet complete. For instance, the custom rules only apply to files in the same directory of the configuration file. Please take some time to read the Wiki and give the new version a try. Your feedback is also welcome. |
Hi,
I’m keen to see and test the new function. However, maybe I’m a little stupid, but I don’t see how I can download the beta version from GitHub.
Kind regards, Heinz
Von: WMJ ***@***.***>
Gesendet: Mittwoch, 25. September 2024 14:38
An: wmjordan/Codist ***@***.***>
Cc: Heinz Kessler ***@***.***>; Author ***@***.***>
Betreff: Re: [wmjordan/Codist] Support Community Toolkit MVVM Attributes (Issue #266)
The new feature is not yet complete. For instance, the custom rules only apply to files in the same directory of the configuration file. Please take some time to read the Wiki and give the new version a try. Your feedback is also welcome.
—
Reply to this email directly, view it on GitHub <#266 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AF2XTUTWUGADT7VJTJEPHX3ZYKVDTAVCNFSM6AAAAABOKTCY42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTHE3DSNRSG4> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AF2XTUSGBCIYYHONBUPJKV3ZYKVDTA5CNFSM6AAAAABOKTCY42WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUNP7TNW.gif> Message ID: ***@***.*** ***@***.***> >
|
The new beta can be downloaded here. It is an issue that pinned on top of the Issues section. |
Hi,
thanks a lot. I will try it now.
How do you prefer to get feedback?
Regards, Heinz
Von: WMJ ***@***.***>
Gesendet: Donnerstag, 26. September 2024 09:47
An: wmjordan/Codist ***@***.***>
Cc: Heinz Kessler ***@***.***>; Author ***@***.***>
Betreff: Re: [wmjordan/Codist] Support Community Toolkit MVVM Attributes (Issue #266)
The new beta can be downloaded here <#334> . It is an issue that pinned on top of the Issues section.
—
Reply to this email directly, view it on GitHub <#266 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AF2XTUWZR3UBKXPH3BGYD4DZYO3XRAVCNFSM6AAAAABOKTCY42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZWGE3TQMBQGI> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AF2XTUXM5JQNIO5PAM4MZFDZYO3XRA5CNFSM6AAAAABOKTCY42WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUNUGMVE.gif> Message ID: ***@***.*** ***@***.***> >
|
Just leave a line here on GitHub will do. |
The documentation says, a |
You are right. Maybe it is appropriate to offer a link to create a template file in the config folder, and a button to open that config file with Visual Studio. |
Can you tell me where I can find that folder? |
Thanks. |
Sorry to have you confused. Please take a look at the above screenshot, the Advanced Syntax Highlight is the first checkbox under the "Feature Controllers". |
Oh, thanks! Then maybe you should call it what it is: "Advanced Syntax Highlight" |
Thanks for your valuable feedback. |
The .Net Community Toolkit is sure to become popular very quickly.
Its MVVM toolkit allows for automatic generation of boilerplate code needed for properties, relay commands etc. in WPF.
A WPF "observable property" will look like this:
[ObservableProperty]
private bool _myPropertyValue;
The actual property will be auto generated in a second .cs file, and the class has to be a partial class.
See here.
Therefore the lines above act like a public property.
The only drawback is that there's only a private field left, decorated with the [ObservableProperty] attribute, which will not be formatted as a public property by Codist. Therefore it would be nice if codist could recognize the code generation attributes of the .Net Community Toolkit and offer syntax highlighting accordingly.
The text was updated successfully, but these errors were encountered: