File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
RetailCoder.VBE/UI/Refactorings/Rename
Rubberduck.Parsing/Symbols Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ public bool IsValidName
72
72
return ! ( NewName . Equals ( Target . IdentifierName , StringComparison . InvariantCultureIgnoreCase ) ) &&
73
73
char . IsLetter ( NewName . FirstOrDefault ( ) ) &&
74
74
! tokenValues . Contains ( NewName , StringComparer . InvariantCultureIgnoreCase ) &&
75
- ! NewName . Any ( c => ! char . IsLetterOrDigit ( c ) && c != '_' ) ;
75
+ ! NewName . Any ( c => ! char . IsLetterOrDigit ( c ) && c != '_' ) &&
76
+ NewName . Length <= ( Target . DeclarationType . HasFlag ( DeclarationType . Module ) ? Declaration . MaxModuleNameLength : Declaration . MaxMemberNameLength ) ;
76
77
}
77
78
}
78
79
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ namespace Rubberduck.Parsing.Symbols
19
19
[ DebuggerDisplay ( "({DeclarationType}) {Accessibility} {IdentifierName} As {AsTypeName} | {Selection}" ) ]
20
20
public class Declaration : IEquatable < Declaration >
21
21
{
22
+ public const int MaxModuleNameLength = 31 ;
23
+ public const int MaxMemberNameLength = 255 ;
24
+
22
25
public Declaration (
23
26
QualifiedMemberName qualifiedName ,
24
27
Declaration parentDeclaration ,
You can’t perform that action at this time.
0 commit comments