Auto unit renaming

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2817 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa 2013-10-30 14:38:32 +00:00
parent 38806e4bdc
commit c56afc479f

View File

@ -236,6 +236,17 @@ var
if not found then
WriteLn(Format('Unit not found : "%s".',[oldName]));
end;
for k := 0 to Pred(mdlList.Count) do begin
mdl := TPasModule(mdlList[k]);
if mdl.InheritsFrom(TPasNativeModule) then
Continue;
newName := ExtractIdentifier(mdl.Name);
if (newName <> mdl.Name) then begin
oldName := mdl.Name;
mdl.Name := newName;
WriteLn(Format('Unit renamed, old name = "%s", new name = "%s".',[oldName,newName]));
end;
end;
end;
function ProcessFile():Boolean;
@ -324,7 +335,7 @@ var
srcMngr.CreateItem(ChangeFileExt(ExtractFileName(inFileName),'.xsd')).Write(strStream.DataString);
end;
end;
Result := True;
except
on E : Exception do begin