Skip to content

Commit

Permalink
feat(UxmlNameAttribute): move from UIComponents.Experimental namespac…
Browse files Browse the repository at this point in the history
…e to UIComponents

BREAKING CHANGE: UxmlNameAttribute has been moved from the UIComponents.Experimental namespace to UIComponents.
  • Loading branch information
jonisavo committed Oct 21, 2022
1 parent a1dcb2b commit a484ec4
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 8 deletions.
4 changes: 1 addition & 3 deletions Assets/UIComponents.Tests/Roslyn/UxmlNameTestComponent.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using UIComponents.Experimental;

namespace UIComponents.Tests.Roslyn
namespace UIComponents.Tests.Roslyn
{
[UxmlName("UxmlNameTest")]
public partial class UxmlNameTestComponent : UIComponent {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using UnityEngine.TestTools;
using UnityEngine.UIElements;

namespace UIComponents.Experimental
namespace UIComponents
{
/// <summary>
/// When used in Unity 2021.2 or later, this attribute will generate
Expand Down
Binary file modified Assets/UIComponents/Roslyn/UIComponents.Roslyn.Generation.dll
Binary file not shown.
Binary file modified Assets/UIComponents/Roslyn/UIComponents.Roslyn.Generation.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Diagnostics.CodeAnalysis;

namespace UIComponents.Experimental
namespace UIComponents
{
[ExcludeFromCodeCoverage]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Microsoft.CodeAnalysis.CSharp;
using UIComponents.Roslyn.Generation.Generators.Uxml;
using UIComponents.Roslyn.Generation.Tests.Utilities;

Expand Down Expand Up @@ -276,7 +275,6 @@ public Task Generates_UxmlFactory_With_UxmlName()
{
var source = @"
using UIComponents;
using UIComponents.Experimental;
[UxmlName(""MyUxmlNameAttribute"")]
public partial class MyUxmlNameAttributeComponent : UIComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected override void OnBeforeExecute(GeneratorExecutionContext context)
_traitAttributeSymbol =
context.Compilation.GetTypeByMetadataName("UIComponents.Experimental.UxmlTraitAttribute");
_uxmlNameAttributeSymbol =
context.Compilation.GetTypeByMetadataName("UIComponents.Experimental.UxmlNameAttribute");
context.Compilation.GetTypeByMetadataName("UIComponents.UxmlNameAttribute");
}

protected override bool ShouldGenerateSource(AugmentGenerationContext context)
Expand Down

0 comments on commit a484ec4

Please sign in to comment.