mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 00:19:22 +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)
|
||||
else
|
||||
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);
|
||||
Result:=shrCancel;
|
||||
end;
|
||||
|
||||
function CollectDeclarations(CodeBuffer: TCodeBuffer;
|
||||
@ -1471,7 +1476,10 @@ begin
|
||||
|
||||
Result:=CollectDeclarations(CodeBuffer,Complete);
|
||||
if Complete then exit;
|
||||
debugln(['TIDEHelpManager.ShowHelpForSourcePosition no declaration found, trying keywords ...']);
|
||||
Result:=CollectKeyWords(CodeBuffer);
|
||||
if Result in [shrCancel,shrSuccess] then exit;
|
||||
debugln(['TIDEHelpManager.ShowHelpForSourcePosition END']);
|
||||
end;
|
||||
|
||||
function TIDEHelpManager.ConvertCodePosToPascalHelpContext(
|
||||
|
@ -43,8 +43,8 @@ type
|
||||
shrSuccess,
|
||||
shrCancel,
|
||||
shrDatabaseNotFound,
|
||||
shrContextNotFound,
|
||||
shrViewerNotFound,
|
||||
shrContextNotFound, // database found, but the element was not found
|
||||
shrViewerNotFound, // no viewer registered for this format
|
||||
shrHelpNotFound,
|
||||
shrViewerError,
|
||||
shrSelectorError
|
||||
@ -250,7 +250,7 @@ function ShowHelpForContext(HelpDatabaseID: THelpDatabaseID;
|
||||
function ShowHelpForContext(HelpContext: THelpContext; var ErrMsg: string
|
||||
): 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;
|
||||
const HelpKeyword: string): TShowHelpResult;
|
||||
function ShowHelpForKeyword(HelpDatabaseID: THelpDatabaseID;
|
||||
|
Loading…
Reference in New Issue
Block a user