IDE: added verbosity

git-svn-id: trunk@10467 -
This commit is contained in:
mattias 2007-01-18 12:22:04 +00:00
parent b66c203a3c
commit 00b53f40c8
3 changed files with 23 additions and 5 deletions

View File

@ -1122,6 +1122,7 @@ end;
function TCodeCompletionCodeTool.ApplyClassCompletion: boolean;
begin
DebugLn(['TCodeCompletionCodeTool.ApplyClassCompletion DoInsertSpaceInFront=',AtomTypesToStr(ASourceChangeCache.BeautifyCodeOptions.DoInsertSpaceInFront),' DoInsertSpaceAfter=',AtomTypesToStr(ASourceChangeCache.BeautifyCodeOptions.DoInsertSpaceAfter)]);
Result:=false;
try
// insert all new class parts

View File

@ -263,6 +263,7 @@ const
DefaultDoNotInsertSpaceAfter: TAtomTypes = [atDirectiveStart];
function AtomTypeNameToType(const s: string): TAtomType;
function AtomTypesToStr(const AtomTypes: TAtomTypes): string;
function WordPolicyNameToPolicy(const s: string): TWordPolicy;
function ClassPartPolicyNameToPolicy(const s: string): TClassPartInsertPolicy;
function MethodInsertPolicyNameToPolicy(const s: string): TMethodInsertPolicy;
@ -276,21 +277,35 @@ implementation
function AtomTypeNameToType(const s: string): TAtomType;
begin
for Result:=Low(TAtomType) to High(TAtomType) do
if AnsiCompareText(AtomTypeNames[Result],s)=0 then exit;
if SysUtils.CompareText(AtomTypeNames[Result],s)=0 then exit;
Result:=atNone;
end;
function AtomTypesToStr(const AtomTypes: TAtomTypes): string;
var
a: TAtomType;
begin
Result:='';
for a:=Low(TAtomType) to High(TAtomType) do begin
if a in AtomTypes then begin
if Result<>'' then Result:=Result+',';
Result:=Result+AtomTypeNames[a];
end;
end;
Result:='['+Result+']';
end;
function WordPolicyNameToPolicy(const s: string): TWordPolicy;
begin
for Result:=Low(TWordPolicy) to High(TWordPolicy) do
if AnsiCompareText(WordPolicyNames[Result],s)=0 then exit;
if SysUtils.CompareText(WordPolicyNames[Result],s)=0 then exit;
Result:=wpNone;
end;
function ClassPartPolicyNameToPolicy(const s: string): TClassPartInsertPolicy;
begin
for Result:=Low(TClassPartInsertPolicy) to High(TClassPartInsertPolicy) do
if AnsiCompareText(ClassPartInsertPolicyNames[Result],s)=0 then exit;
if SysUtils.CompareText(ClassPartInsertPolicyNames[Result],s)=0 then exit;
Result:=cpipLast;
end;
@ -298,7 +313,7 @@ function MethodInsertPolicyNameToPolicy(
const s: string): TMethodInsertPolicy;
begin
for Result:=Low(TMethodInsertPolicy) to High(TMethodInsertPolicy) do
if AnsiCompareText(MethodInsertPolicyNames[Result],s)=0 then exit;
if SysUtils.CompareText(MethodInsertPolicyNames[Result],s)=0 then exit;
Result:=mipLast;
end;
@ -307,7 +322,8 @@ function ForwardProcBodyInsertPolicyNameToPolicy(
begin
for Result:=Low(TForwardProcBodyInsertPolicy)
to High(TForwardProcBodyInsertPolicy) do
if AnsiCompareText(ForwardProcBodyInsertPolicyNames[Result],s)=0 then exit;
if SysUtils.CompareText(ForwardProcBodyInsertPolicyNames[Result],s)=0 then
exit;
Result:=fpipBehindMethods;
end;

View File

@ -788,6 +788,7 @@ begin
BeautifyCodeOptions.DoNotSplitLineAfter:=DoNotSplitLineAfter;
BeautifyCodeOptions.DoInsertSpaceInFront:=DoInsertSpaceInFront;
BeautifyCodeOptions.DoInsertSpaceAfter:=DoInsertSpaceAfter;
DebugLn(['TCodeToolsOptions.AssignTo DoInsertSpaceInFront=',AtomTypesToStr(BeautifyCodeOptions.DoInsertSpaceInFront),' DoInsertSpaceAfter=',AtomTypesToStr(BeautifyCodeOptions.DoInsertSpaceAfter)]);
BeautifyCodeOptions.PropertyReadIdentPrefix:=PropertyReadIdentPrefix;
BeautifyCodeOptions.PropertyWriteIdentPrefix:=PropertyWriteIdentPrefix;
BeautifyCodeOptions.PropertyStoredIdentPostfix:=PropertyStoredIdentPostfix;