ide: tooltip evaluation: if codetools can't evaluate full expression then use identifier

git-svn-id: trunk@21944 -
This commit is contained in:
paul 2009-10-01 13:08:14 +00:00
parent 880b4f97b6
commit 351a3caead

View File

@ -13543,10 +13543,10 @@ begin
if Identifier = '' then Exit;
if SrcEdit.SelectionAvailable and SrcEdit.CaretInSelection(CaretPos) then
Expression := SrcEdit.GetText(True)
else begin
if not CodeToolBoss.ExtractOperand(SrcEdit.CodeBuffer,
CaretPos.X,CaretPos.Y,Expression,false) then exit;
end;
else
if not CodeToolBoss.ExtractOperand(SrcEdit.CodeBuffer,
CaretPos.X,CaretPos.Y,Expression,false) then
Expression := Identifier;
//DebugLn(['TMainIDE.OnSrcNotebookShowHintForSource Expr="',Expression,'"']);
if not DebugBoss.Evaluate(Expression, DebugEval) or (DebugEval = '') then
DebugEval := '???';