mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 05:19:37 +02:00
IDE: added verbosity
git-svn-id: trunk@10467 -
This commit is contained in:
parent
b66c203a3c
commit
00b53f40c8
@ -1122,6 +1122,7 @@ end;
|
|||||||
|
|
||||||
function TCodeCompletionCodeTool.ApplyClassCompletion: boolean;
|
function TCodeCompletionCodeTool.ApplyClassCompletion: boolean;
|
||||||
begin
|
begin
|
||||||
|
DebugLn(['TCodeCompletionCodeTool.ApplyClassCompletion DoInsertSpaceInFront=',AtomTypesToStr(ASourceChangeCache.BeautifyCodeOptions.DoInsertSpaceInFront),' DoInsertSpaceAfter=',AtomTypesToStr(ASourceChangeCache.BeautifyCodeOptions.DoInsertSpaceAfter)]);
|
||||||
Result:=false;
|
Result:=false;
|
||||||
try
|
try
|
||||||
// insert all new class parts
|
// insert all new class parts
|
||||||
|
@ -263,6 +263,7 @@ const
|
|||||||
DefaultDoNotInsertSpaceAfter: TAtomTypes = [atDirectiveStart];
|
DefaultDoNotInsertSpaceAfter: TAtomTypes = [atDirectiveStart];
|
||||||
|
|
||||||
function AtomTypeNameToType(const s: string): TAtomType;
|
function AtomTypeNameToType(const s: string): TAtomType;
|
||||||
|
function AtomTypesToStr(const AtomTypes: TAtomTypes): string;
|
||||||
function WordPolicyNameToPolicy(const s: string): TWordPolicy;
|
function WordPolicyNameToPolicy(const s: string): TWordPolicy;
|
||||||
function ClassPartPolicyNameToPolicy(const s: string): TClassPartInsertPolicy;
|
function ClassPartPolicyNameToPolicy(const s: string): TClassPartInsertPolicy;
|
||||||
function MethodInsertPolicyNameToPolicy(const s: string): TMethodInsertPolicy;
|
function MethodInsertPolicyNameToPolicy(const s: string): TMethodInsertPolicy;
|
||||||
@ -276,21 +277,35 @@ implementation
|
|||||||
function AtomTypeNameToType(const s: string): TAtomType;
|
function AtomTypeNameToType(const s: string): TAtomType;
|
||||||
begin
|
begin
|
||||||
for Result:=Low(TAtomType) to High(TAtomType) do
|
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;
|
Result:=atNone;
|
||||||
end;
|
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;
|
function WordPolicyNameToPolicy(const s: string): TWordPolicy;
|
||||||
begin
|
begin
|
||||||
for Result:=Low(TWordPolicy) to High(TWordPolicy) do
|
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;
|
Result:=wpNone;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ClassPartPolicyNameToPolicy(const s: string): TClassPartInsertPolicy;
|
function ClassPartPolicyNameToPolicy(const s: string): TClassPartInsertPolicy;
|
||||||
begin
|
begin
|
||||||
for Result:=Low(TClassPartInsertPolicy) to High(TClassPartInsertPolicy) do
|
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;
|
Result:=cpipLast;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -298,7 +313,7 @@ function MethodInsertPolicyNameToPolicy(
|
|||||||
const s: string): TMethodInsertPolicy;
|
const s: string): TMethodInsertPolicy;
|
||||||
begin
|
begin
|
||||||
for Result:=Low(TMethodInsertPolicy) to High(TMethodInsertPolicy) do
|
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;
|
Result:=mipLast;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -307,7 +322,8 @@ function ForwardProcBodyInsertPolicyNameToPolicy(
|
|||||||
begin
|
begin
|
||||||
for Result:=Low(TForwardProcBodyInsertPolicy)
|
for Result:=Low(TForwardProcBodyInsertPolicy)
|
||||||
to High(TForwardProcBodyInsertPolicy) do
|
to High(TForwardProcBodyInsertPolicy) do
|
||||||
if AnsiCompareText(ForwardProcBodyInsertPolicyNames[Result],s)=0 then exit;
|
if SysUtils.CompareText(ForwardProcBodyInsertPolicyNames[Result],s)=0 then
|
||||||
|
exit;
|
||||||
Result:=fpipBehindMethods;
|
Result:=fpipBehindMethods;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -788,6 +788,7 @@ begin
|
|||||||
BeautifyCodeOptions.DoNotSplitLineAfter:=DoNotSplitLineAfter;
|
BeautifyCodeOptions.DoNotSplitLineAfter:=DoNotSplitLineAfter;
|
||||||
BeautifyCodeOptions.DoInsertSpaceInFront:=DoInsertSpaceInFront;
|
BeautifyCodeOptions.DoInsertSpaceInFront:=DoInsertSpaceInFront;
|
||||||
BeautifyCodeOptions.DoInsertSpaceAfter:=DoInsertSpaceAfter;
|
BeautifyCodeOptions.DoInsertSpaceAfter:=DoInsertSpaceAfter;
|
||||||
|
DebugLn(['TCodeToolsOptions.AssignTo DoInsertSpaceInFront=',AtomTypesToStr(BeautifyCodeOptions.DoInsertSpaceInFront),' DoInsertSpaceAfter=',AtomTypesToStr(BeautifyCodeOptions.DoInsertSpaceAfter)]);
|
||||||
BeautifyCodeOptions.PropertyReadIdentPrefix:=PropertyReadIdentPrefix;
|
BeautifyCodeOptions.PropertyReadIdentPrefix:=PropertyReadIdentPrefix;
|
||||||
BeautifyCodeOptions.PropertyWriteIdentPrefix:=PropertyWriteIdentPrefix;
|
BeautifyCodeOptions.PropertyWriteIdentPrefix:=PropertyWriteIdentPrefix;
|
||||||
BeautifyCodeOptions.PropertyStoredIdentPostfix:=PropertyStoredIdentPostfix;
|
BeautifyCodeOptions.PropertyStoredIdentPostfix:=PropertyStoredIdentPostfix;
|
||||||
|
Loading…
Reference in New Issue
Block a user