mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 06:20:17 +02:00
IDE: help for unknown identifier: do not show error about FPC keyword, the following error is enough
git-svn-id: trunk@43889 -
This commit is contained in:
parent
9b1b6748f1
commit
119dc4be64
@ -1400,8 +1400,13 @@ function TIDEHelpManager.ShowHelpForSourcePosition(const Filename: string;
|
|||||||
Result:=ShowHelpForDirective('',IDEDirectiveHelpPrefix+Keyword,ErrorMsg)
|
Result:=ShowHelpForDirective('',IDEDirectiveHelpPrefix+Keyword,ErrorMsg)
|
||||||
else
|
else
|
||||||
Result:=ShowHelpForKeyword('',FPCKeyWordHelpPrefix+Keyword,ErrorMsg);
|
Result:=ShowHelpForKeyword('',FPCKeyWordHelpPrefix+Keyword,ErrorMsg);
|
||||||
if Result=shrHelpNotFound then exit;
|
if Result=shrSuccess then
|
||||||
|
exit;
|
||||||
|
if Result in [shrNone,shrDatabaseNotFound,shrContextNotFound,shrHelpNotFound] then
|
||||||
|
exit(shrHelpNotFound); // not a FPC keyword
|
||||||
|
// viewer error
|
||||||
HelpManager.ShowError(Result,ErrorMsg);
|
HelpManager.ShowError(Result,ErrorMsg);
|
||||||
|
Result:=shrCancel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function CollectDeclarations(CodeBuffer: TCodeBuffer;
|
function CollectDeclarations(CodeBuffer: TCodeBuffer;
|
||||||
@ -1471,7 +1476,10 @@ begin
|
|||||||
|
|
||||||
Result:=CollectDeclarations(CodeBuffer,Complete);
|
Result:=CollectDeclarations(CodeBuffer,Complete);
|
||||||
if Complete then exit;
|
if Complete then exit;
|
||||||
|
debugln(['TIDEHelpManager.ShowHelpForSourcePosition no declaration found, trying keywords ...']);
|
||||||
Result:=CollectKeyWords(CodeBuffer);
|
Result:=CollectKeyWords(CodeBuffer);
|
||||||
|
if Result in [shrCancel,shrSuccess] then exit;
|
||||||
|
debugln(['TIDEHelpManager.ShowHelpForSourcePosition END']);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIDEHelpManager.ConvertCodePosToPascalHelpContext(
|
function TIDEHelpManager.ConvertCodePosToPascalHelpContext(
|
||||||
|
@ -43,8 +43,8 @@ type
|
|||||||
shrSuccess,
|
shrSuccess,
|
||||||
shrCancel,
|
shrCancel,
|
||||||
shrDatabaseNotFound,
|
shrDatabaseNotFound,
|
||||||
shrContextNotFound,
|
shrContextNotFound, // database found, but the element was not found
|
||||||
shrViewerNotFound,
|
shrViewerNotFound, // no viewer registered for this format
|
||||||
shrHelpNotFound,
|
shrHelpNotFound,
|
||||||
shrViewerError,
|
shrViewerError,
|
||||||
shrSelectorError
|
shrSelectorError
|
||||||
@ -250,7 +250,7 @@ function ShowHelpForContext(HelpDatabaseID: THelpDatabaseID;
|
|||||||
function ShowHelpForContext(HelpContext: THelpContext; var ErrMsg: string
|
function ShowHelpForContext(HelpContext: THelpContext; var ErrMsg: string
|
||||||
): TShowHelpResult; overload;
|
): TShowHelpResult; overload;
|
||||||
|
|
||||||
// help by keyword (an arbitrary keyword, not a fpc keyword)
|
// help by keyword (an arbitrary keyword, not only fpc keyword)
|
||||||
function ShowHelpOrErrorForKeyword(HelpDatabaseID: THelpDatabaseID;
|
function ShowHelpOrErrorForKeyword(HelpDatabaseID: THelpDatabaseID;
|
||||||
const HelpKeyword: string): TShowHelpResult;
|
const HelpKeyword: string): TShowHelpResult;
|
||||||
function ShowHelpForKeyword(HelpDatabaseID: THelpDatabaseID;
|
function ShowHelpForKeyword(HelpDatabaseID: THelpDatabaseID;
|
||||||
|
Loading…
Reference in New Issue
Block a user