diff --git a/src/DynamoCore/Graph/Nodes/CustomNodes/Function.cs b/src/DynamoCore/Graph/Nodes/CustomNodes/Function.cs index 50c6c683ed2..5dfd228efa9 100644 --- a/src/DynamoCore/Graph/Nodes/CustomNodes/Function.cs +++ b/src/DynamoCore/Graph/Nodes/CustomNodes/Function.cs @@ -5,6 +5,7 @@ using Dynamo.Engine; using Dynamo.Engine.CodeGeneration; using Dynamo.Library; +using Dynamo.Properties; using Newtonsoft.Json; using ProtoCore; using ProtoCore.AST.AssociativeAST; @@ -388,8 +389,13 @@ public Symbol() RegisterAllPorts(); ArgumentLacing = LacingStrategy.Disabled; - - InputSymbol = String.Empty; + InputSymbol = new TypedParameter( + Resources.InputPortAlternativeName, + "var", + -1, + null, + Resources.InputNodeRenameHint) + .ToCommentNameString(); ElementResolver = new ElementResolver(); } @@ -463,7 +469,7 @@ public string InputSymbol } OnNodeModified(); - RaisePropertyChanged("InputSymbol"); + RaisePropertyChanged(nameof(InputSymbol)); } } diff --git a/src/DynamoCore/Properties/Resources.Designer.cs b/src/DynamoCore/Properties/Resources.Designer.cs index 31864038d8b..abd8ff1c454 100644 --- a/src/DynamoCore/Properties/Resources.Designer.cs +++ b/src/DynamoCore/Properties/Resources.Designer.cs @@ -992,6 +992,15 @@ public static string InputNodeDescription { } } + /// + /// Looks up a localized string similar to default input name, rename me!. + /// + public static string InputNodeRenameHint { + get { + return ResourceManager.GetString("InputNodeRenameHint", resourceCulture); + } + } + /// /// Looks up a localized string similar to variable;argument;parameter. /// diff --git a/src/DynamoCore/Properties/Resources.en-US.resx b/src/DynamoCore/Properties/Resources.en-US.resx index ad2ca83d86c..9e0c109e30d 100644 --- a/src/DynamoCore/Properties/Resources.en-US.resx +++ b/src/DynamoCore/Properties/Resources.en-US.resx @@ -911,4 +911,7 @@ This package likely contains an assembly that is blocked. You will need to load This workspace contains element binding data in a legacy format that is no longer supported in Dynamo 3.0 and higher versions. Element binding data will be saved in the new format the next time you run and save this workspace. + + default input name, rename me! + \ No newline at end of file diff --git a/src/DynamoCore/Properties/Resources.resx b/src/DynamoCore/Properties/Resources.resx index 4306d13dc3a..2439e0fe643 100644 --- a/src/DynamoCore/Properties/Resources.resx +++ b/src/DynamoCore/Properties/Resources.resx @@ -914,4 +914,7 @@ This package likely contains an assembly that is blocked. You will need to load This workspace contains element binding data in a legacy format that is no longer supported in Dynamo 3.0 and higher versions. Element binding data will be saved in the new format the next time you run and save this workspace. - + + default input name, rename me! + + \ No newline at end of file diff --git a/src/DynamoCore/PublicAPI.Unshipped.txt b/src/DynamoCore/PublicAPI.Unshipped.txt index f1d04bf7b45..6acf7363347 100644 --- a/src/DynamoCore/PublicAPI.Unshipped.txt +++ b/src/DynamoCore/PublicAPI.Unshipped.txt @@ -2834,6 +2834,7 @@ static Dynamo.Properties.Resources.IncorrectlyFormattedNodeLibraryWarning.get -> static Dynamo.Properties.Resources.IncorrectVersionToOpenFile.get -> string static Dynamo.Properties.Resources.InputLabel.get -> string static Dynamo.Properties.Resources.InputNodeDescription.get -> string +static Dynamo.Properties.Resources.InputNodeRenameHint.get -> string static Dynamo.Properties.Resources.InputNodeSearchTags.get -> string static Dynamo.Properties.Resources.InputPortAlternativeName.get -> string static Dynamo.Properties.Resources.InsertDialogBoxText.get -> string diff --git a/test/DynamoCoreTests/CustomNodes.cs b/test/DynamoCoreTests/CustomNodes.cs index 10340b148ab..4332cab577d 100644 --- a/test/DynamoCoreTests/CustomNodes.cs +++ b/test/DynamoCoreTests/CustomNodes.cs @@ -1423,5 +1423,13 @@ public void LooseCustomNodeShouldNotHavePackageInfoOrPackageMember() Assert.IsFalse(nodeInfo.Value.IsPackageMember); Assert.IsNull(nodeInfo.Value.PackageInfo); } + [Test] + public void InputNodeShouldHaveNameByDefault() + { + var input = new Symbol(); + Assert.NotNull(input.Parameter.Name); + Assert.IsNotEmpty(input.Parameter.Name); + Assert.AreEqual("input",input.Parameter.Name); + } } }