mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:19:32 +02:00
IDE: code explorer: ignore syntax errors when retrieving node description
git-svn-id: trunk@20140 -
This commit is contained in:
parent
602f48c153
commit
60faf70d14
@ -42,8 +42,9 @@ uses
|
|||||||
Classes, SysUtils, LCLProc, LCLType, LResources, Forms, Controls, Graphics,
|
Classes, SysUtils, LCLProc, LCLType, LResources, Forms, Controls, Graphics,
|
||||||
Dialogs, Buttons, ComCtrls, Menus, LDockCtrl, AvgLvlTree, StdCtrls, ExtCtrls,
|
Dialogs, Buttons, ComCtrls, Menus, LDockCtrl, AvgLvlTree, StdCtrls, ExtCtrls,
|
||||||
// CodeTools
|
// CodeTools
|
||||||
BasicCodeTools, CodeToolManager, CodeAtom, CodeCache, CodeTree,
|
BasicCodeTools, CustomCodeTool, CodeToolManager, CodeAtom, CodeCache,
|
||||||
KeywordFuncLists, FindDeclarationTool, DirectivesTree, PascalParserTool,
|
CodeTree, KeywordFuncLists, FindDeclarationTool, DirectivesTree,
|
||||||
|
PascalParserTool,
|
||||||
// IDE Intf
|
// IDE Intf
|
||||||
LazIDEIntf, IDECommands, MenuIntf, SrcEditorIntf,
|
LazIDEIntf, IDECommands, MenuIntf, SrcEditorIntf,
|
||||||
// IDE
|
// IDE
|
||||||
@ -517,6 +518,8 @@ end;
|
|||||||
function TCodeExplorerView.GetCodeNodeDescription(ACodeTool: TCodeTool;
|
function TCodeExplorerView.GetCodeNodeDescription(ACodeTool: TCodeTool;
|
||||||
CodeNode: TCodeTreeNode): string;
|
CodeNode: TCodeTreeNode): string;
|
||||||
begin
|
begin
|
||||||
|
Result:='?';
|
||||||
|
try
|
||||||
case CodeNode.Desc of
|
case CodeNode.Desc of
|
||||||
|
|
||||||
ctnUnit, ctnProgram, ctnLibrary, ctnPackage:
|
ctnUnit, ctnProgram, ctnLibrary, ctnPackage:
|
||||||
@ -544,6 +547,9 @@ begin
|
|||||||
else
|
else
|
||||||
Result:=CodeNode.DescAsString;
|
Result:=CodeNode.DescAsString;
|
||||||
end;
|
end;
|
||||||
|
except
|
||||||
|
on E: ECodeToolError do ; // ignore syntax errors
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeExplorerView.GetDirectiveNodeDescription(
|
function TCodeExplorerView.GetDirectiveNodeDescription(
|
||||||
|
Loading…
Reference in New Issue
Block a user