-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(UxmlTraitAttribute): use a kebab-case version of member name by …
…default BREAKING CHANGE: UxmlNameAttribute now uses a kebab-case version of the member name by default.
- Loading branch information
Showing
20 changed files
with
101 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/UIComponents.Tests/Roslyn/Resources/RoslynTestComponent.uxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<UXML xmlns:test="UIComponents.Tests.Roslyn"> | ||
<test:RoslynTestComponent current-time="123.456" text-color="#FF0000" greeting="Morning" enabled="false" /> | ||
<test:RoslynTestComponent time="123.456" text-color="#FF0000" greeting="Morning" enabled="false" /> | ||
</UXML> |
2 changes: 1 addition & 1 deletion
2
Assets/UIComponents.Tests/Roslyn/Resources/RoslynTestVisualElement.uxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<UXML xmlns:test="UIComponents.Tests.Roslyn"> | ||
<test:RoslynTestVisualElement age="20" music-volume="0.5" unix-timestamp="1234567890" /> | ||
<test:RoslynTestVisualElement age="20" music-volume="0.5" timestamp="1234567890" /> | ||
</UXML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+512 Bytes
(100%)
Assets/UIComponents/Roslyn/UIComponents.Roslyn.Generation.dll
Binary file not shown.
Binary file modified
BIN
+284 Bytes
(100%)
Assets/UIComponents/Roslyn/UIComponents.Roslyn.Generation.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...napshots/UxmlAugmentGeneratorSnapshotTests.Handles_Long_Member_Name_For_Trait.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//HintName: LongTraitNameComponent.Uxml.g.cs | ||
// <auto-generated> | ||
// This file has been generated automatically by UIComponents.Roslyn. | ||
// Do not attempt to modify it. Any changes will be overridden during compilation. | ||
// </auto-generated> | ||
|
||
using System.CodeDom.Compiler; | ||
using UnityEngine.UIElements; | ||
|
||
public partial class LongTraitNameComponent | ||
{ | ||
[GeneratedCode("UIComponents.Roslyn.Generation", "0.26.0")] | ||
public new partial class UxmlFactory : UxmlFactory<LongTraitNameComponent, UxmlTraits> {} | ||
|
||
[GeneratedCode("UIComponents.Roslyn.Generation", "0.26.0")] | ||
public new partial class UxmlTraits : VisualElement.UxmlTraits | ||
{ | ||
UxmlIntAttributeDescription m_HereIsALongMemberNameWithALotOfComplexity123Test_Hello___WorldA = new UxmlIntAttributeDescription { name = "here-is-a-long-member-name-with-a-lot-of-complexity123-test-hello-world-a" }; | ||
|
||
[GeneratedCode("UIComponents.Roslyn.Generation", "0.26.0")] | ||
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) | ||
{ | ||
base.Init(ve, bag, cc); | ||
((LongTraitNameComponent)ve).HereIsALongMemberNameWithALotOfComplexity123Test_Hello___WorldA = m_HereIsALongMemberNameWithALotOfComplexity123Test_Hello___WorldA.GetValueFromBag(bag, cc); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters