-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
99 changed files
with
468 additions
and
693 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
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
Packages/com.naukri.inspector-maid/Editor/Contexts/Core/VisualContext.cs
This file was deleted.
Oops, something went wrong.
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
24 changes: 0 additions & 24 deletions
24
Packages/com.naukri.inspector-maid/Editor/Contexts/MultiChildVisualContext.cs
This file was deleted.
Oops, something went wrong.
26 changes: 4 additions & 22 deletions
26
Packages/com.naukri.inspector-maid/Editor/Contexts/NoneChildContext.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
21 changes: 0 additions & 21 deletions
21
Packages/com.naukri.inspector-maid/Editor/Contexts/NoneChildVisualContext.cs
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
Packages/com.naukri.inspector-maid/Editor/Contexts/NoneChildVisualContext.cs.meta
This file was deleted.
Oops, something went wrong.
30 changes: 6 additions & 24 deletions
30
Packages/com.naukri.inspector-maid/Editor/Contexts/SingleChildContext.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 |
---|---|---|
@@ -1,46 +1,28 @@ | ||
using Naukri.InspectorMaid.Editor.Contexts.Core; | ||
using Naukri.InspectorMaid.Editor.Widgets.Core; | ||
using System; | ||
using System; | ||
|
||
namespace Naukri.InspectorMaid.Editor.Contexts | ||
{ | ||
public sealed partial class SingleChildContext : Context | ||
{ | ||
public SingleChildContext(IWidget widget) | ||
public SingleChildContext(Widget widget) : base(widget) | ||
{ | ||
Widget = widget; | ||
} | ||
|
||
private Context child; | ||
|
||
public override IWidget Widget { get; } | ||
|
||
public override void VisitChildContexts(Action<Context> visitor) | ||
{ | ||
VisitChildContexts(ref child, visitor); | ||
visitor(child); | ||
} | ||
|
||
protected override void OnChildAttached(Context child) | ||
{ | ||
OnChildAttached(ref this.child, child); | ||
} | ||
} | ||
|
||
partial class SingleChildContext | ||
{ | ||
internal static void VisitChildContexts(ref Context childRef, Action<Context> visitor) | ||
{ | ||
visitor(childRef); | ||
} | ||
|
||
internal static void OnChildAttached(ref Context childRef, Context child) | ||
{ | ||
if (childRef != null) | ||
if (this.child != null) | ||
{ | ||
throw new Exception($"{nameof(SingleChildContext)} can only have one child"); | ||
throw new Exception($"{nameof(SingleChildContext)} must have only one child."); | ||
} | ||
|
||
childRef = child; | ||
this.child = child; | ||
} | ||
} | ||
} |
23 changes: 0 additions & 23 deletions
23
Packages/com.naukri.inspector-maid/Editor/Contexts/SingleChildVisualContext.cs
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...Editor/Widgets/Core/IAttributeProvider.cs → ...or-maid/Editor/Core/IAttributeProvider.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
Oops, something went wrong.