codetools: find declaration: implemented if string is ansistring

git-svn-id: trunk@14167 -
This commit is contained in:
mattias 2008-02-16 22:57:10 +00:00
parent 697fc18008
commit b961973398
2 changed files with 9 additions and 5 deletions

View File

@ -35,8 +35,8 @@ interface
{$I codetools.inc}
{ $DEFINE CTDEBUG}
{ $DEFINE ShowAllProcs}
{off $DEFINE CTDEBUG}
{off $DEFINE ShowAllProcs}
uses
{$IFDEF MEM_CHECK}
@ -739,7 +739,7 @@ begin
if (ClassNode=nil) or (ClassNode.Desc<>ctnClass) or (AMethodName='')
or (ATypeInfo=nil) or (SourceChangeCache=nil) or (Scanner=nil) then exit;
{$IFDEF CTDEBUG}
DebugLn(['[TEventsCodeTool.CreateMethod] A AMethodName="',AMethodName,'" in "',MainFilename,'" UseTypeInfoForParameters=',UseTypeInfoForParameters,' ATypeUnitName=',ATypeUnitName]);
DebugLn(['[TEventsCodeTool.CreateMethod] A AMethodName="',AMethodName,'" in "',MainFilename,'" UseTypeInfoForParameters=',UseTypeInfoForParameters]);
{$ENDIF}
// initialize class for code completion
CodeCompleteClassNode:=ClassNode;
@ -897,6 +897,7 @@ var
FirstParameterNode: TCodeTreeNode;
ProcName: PChar;
begin
//DebugLn(['TEventsCodeTool.CollectPublishedMethods Node=',FoundContext.Node.DescAsString]);
if (FoundContext.Node.Desc=ctnProcedure)
and (FoundContext.Node.Parent<>nil)
and (FoundContext.Node.Parent.Desc=ctnClassPublished) then begin

View File

@ -6177,7 +6177,10 @@ begin
xtString:
begin
// ToDo: ask scanner for shortstring, ansistring, widestring
if (Scanner.PascalCompiler=pcDelphi)
or ((Scanner.CompilerMode=cmDELPHI)
or (Scanner.Values['LONGSTRINGS']='1')) then
Result.Desc:=xtAnsiString;
end;
end;
finally
@ -6413,7 +6416,7 @@ begin
ParamCompatibility:=IsCompatible(TargetExprParamList.Items[i],
SourceExprType,Params);
{$IFDEF ShowExprEval}
DebugLn('[TFindDeclarationTool.IsParamNodeListCompatibleToExprList] B ',ExprTypeToString(TargetExprParamList.Items[i]));
DebugLn('[TFindDeclarationTool.IsParamNodeListCompatibleToExprList] B ',ExprTypeToString(TargetExprParamList.Items[i]),' ',TypeCompatibilityNames[ParamCompatibility]);
{$ENDIF}
if CompatibilityList<>nil then
CompatibilityList[i]:=ParamCompatibility;