IDE: designer: allow dotted unit names, bug #20892

git-svn-id: trunk@34175 -
This commit is contained in:
mattias 2011-12-14 10:03:56 +00:00
parent 52611f279a
commit c37254b8ff
2 changed files with 6 additions and 7 deletions

View File

@ -42,10 +42,9 @@ uses
{$IFDEF IDE_MEM_CHECK}
MemCheck,
{$ENDIF}
Classes, SysUtils, AvgLvlTree, TypInfo, LCLProc, LResources, Forms, Controls,
LCLMemManager, LCLIntf, Dialogs,
PropEditUtils, PropEdits, IDEProcs,
BasePkgManager;
Classes, SysUtils, AvgLvlTree, BasicCodeTools, TypInfo, LCLProc, LResources,
Forms, Controls, LCLMemManager, LCLIntf, Dialogs, PropEditUtils, PropEdits,
IDEProcs, BasePkgManager;
type
//----------------------------------------------------------------------------
@ -1259,7 +1258,7 @@ begin
if IndexOf(JITComponent)<0 then
raise Exception.Create('TJITComponentList.RenameComponentUnitname JITComponent.ClassName='+
JITComponent.ClassName);
if (NewUnitName='') or (not IsValidIdent(NewUnitName)) then
if (NewUnitName='') or (not IsDottedIdentifier(NewUnitName)) then
raise Exception.Create('TJITComponentList.RenameComponentUnitname invalid name: "'+NewUnitName+'"');
DoRenameUnitNameOfClass(JITComponent.ClassType,NewUnitName);
end;
@ -1423,7 +1422,7 @@ begin
raise Exception.Create('CreateNewClass NewClassName is not a valid identifier');
if NewUnitName='' then
raise Exception.Create('CreateNewClass NewUnitName empty');
if not IsValidIdent(NewUnitName) then
if not IsDottedIdentifier(NewUnitName) then
raise Exception.Create('CreateNewClass NewUnitName is not a valid identifier');
Result:=nil;

View File

@ -8179,7 +8179,7 @@ begin
// check program name
NewProgramName:=ExtractFileNameOnly(AFilename);
if (NewProgramName='') or (not IsValidIdent(NewProgramName)) then begin
if (NewProgramName='') or (not IsDottedIdentifier(NewProgramName)) then begin
Result:=MessageDlg(lisInvalidProjectFilename,
Format(lisisAnInvalidProjectNamePleaseChooseAnotherEGProject, ['"',
SaveDialog.Filename, '"', #13]),