diff --git a/components/codetools/ide/codynodeinfodlg.lfm b/components/codetools/ide/codynodeinfodlg.lfm index 5e1c432ed7..3f88440aea 100644 --- a/components/codetools/ide/codynodeinfodlg.lfm +++ b/components/codetools/ide/codynodeinfodlg.lfm @@ -10,8 +10,8 @@ object CodyNodeInfoDialog: TCodyNodeInfoDialog LCLVersion = '1.1' object ButtonPanel1: TButtonPanel Left = 6 - Height = 42 - Top = 419 + Height = 36 + Top = 425 Width = 569 OKButton.Name = 'OKButton' OKButton.DefaultCaption = True @@ -26,7 +26,7 @@ object CodyNodeInfoDialog: TCodyNodeInfoDialog end object PageControl1: TPageControl Left = 0 - Height = 413 + Height = 419 Top = 0 Width = 581 ActivePage = CodeBuffersTabSheet @@ -35,13 +35,13 @@ object CodyNodeInfoDialog: TCodyNodeInfoDialog TabOrder = 1 object ReportTabSheet: TTabSheet Caption = 'ReportTabSheet' - ClientHeight = 381 - ClientWidth = 575 + ClientHeight = 390 + ClientWidth = 577 object ReportMemo: TMemo Left = 0 - Height = 381 + Height = 390 Top = 0 - Width = 575 + Width = 577 Align = alClient Lines.Strings = ( 'ReportMemo' @@ -53,13 +53,13 @@ object CodyNodeInfoDialog: TCodyNodeInfoDialog end object CodeBuffersTabSheet: TTabSheet Caption = 'CodeBuffersTabSheet' - ClientHeight = 381 - ClientWidth = 575 + ClientHeight = 390 + ClientWidth = 577 object CodeBuffersComboBox: TComboBox Left = 0 Height = 27 Top = 0 - Width = 575 + Width = 577 Align = alTop ItemHeight = 0 OnSelect = CodeBuffersComboBoxSelect @@ -68,9 +68,9 @@ object CodyNodeInfoDialog: TCodyNodeInfoDialog end object CodeBufferMemo: TMemo Left = 0 - Height = 354 + Height = 363 Top = 27 - Width = 575 + Width = 577 Align = alClient Lines.Strings = ( 'CodeBufferMemo' @@ -79,5 +79,22 @@ object CodyNodeInfoDialog: TCodyNodeInfoDialog TabOrder = 1 end end + object LinksTabSheet: TTabSheet + Caption = 'LinksTabSheet' + ClientHeight = 390 + ClientWidth = 577 + object LinksMemo: TMemo + Left = 0 + Height = 390 + Top = 0 + Width = 577 + Align = alClient + Lines.Strings = ( + 'LinksMemo' + ) + ScrollBars = ssBoth + TabOrder = 0 + end + end end end diff --git a/components/codetools/ide/codynodeinfodlg.pas b/components/codetools/ide/codynodeinfodlg.pas index 2b8b7173be..cd6bedd592 100644 --- a/components/codetools/ide/codynodeinfodlg.pas +++ b/components/codetools/ide/codynodeinfodlg.pas @@ -47,10 +47,12 @@ type ButtonPanel1: TButtonPanel; CodeBufferMemo: TMemo; CodeBuffersComboBox: TComboBox; + LinksMemo: TMemo; PageControl1: TPageControl; ReportMemo: TMemo; ReportTabSheet: TTabSheet; CodeBuffersTabSheet: TTabSheet; + LinksTabSheet: TTabSheet; procedure CodeBuffersComboBoxSelect(Sender: TObject); procedure FormCreate(Sender: TObject); private @@ -86,6 +88,7 @@ begin Caption:=crsCodeNodeInformation; ReportTabSheet.Caption:=crsReport; CodeBuffersTabSheet.Caption:=crsCodeBuffers; + LinksTabSheet.Caption:=crsLinks; ButtonPanel1.CloseButton.Caption:=crsClose; PageControl1.PageIndex:=0; UpdateReport; @@ -217,7 +220,12 @@ var AVLNode: TAVLTreeNode; Filenames: TStringList; CodeBuf: TCodeBuffer; + Scanner: TLinkScanner; + Link: TSourceLink; + LinkSize: Integer; + s: String; begin + Tool:=nil; sl:=TStringList.Create; try SrcEdit:=SourceEditorManagerIntf.ActiveEditor; @@ -241,6 +249,8 @@ begin sl.Add('Unit='+Tool.MainFilename); Tool.BuildTreeAndGetCleanPos(trTillCursor,lsrEnd,CursorPos,CleanPos, [btSetIgnoreErrorPos]); + + // nodes sl.Add('Scanner.ScannedRange='+dbgs(Tool.Scanner.ScannedRange)); sl.Add('Tool.ScannedRange='+dbgs(Tool.ScannedRange)); Node:=Tool.FindDeepestNodeAtPos(CleanPos,false); @@ -269,6 +279,7 @@ begin ReportAllNodes(sl,Tool); end; + // codebuffers Filenames:=TStringList.Create; if Tool.Scanner<>nil then begin UsedCodeBuffers:=Tool.Scanner.CreateTreeOfSourceCodes; @@ -288,6 +299,7 @@ begin end else begin CodeBuffersComboBox.Text:=''; end; + except on e: Exception do CodeToolBoss.HandleException(e); end; @@ -303,6 +315,45 @@ begin ReportMemo.Lines.Assign(sl); sl.Free; end; + // links + sl:=TStringList.Create; + try + sl.Clear; + if Tool.Scanner<>nil then begin + Scanner:=Tool.Scanner; + sl.Add('MainFilename:'+Scanner.MainFilename); + sl.Add('ScannedRange='+dbgs(Scanner.ScannedRange)); + sl.Add('==================================='); + sl.Add('InitialValues:'); + sl.Add(Scanner.InitialValues.AsString); + sl.Add('==================================='); + sl.Add('Values:'); + sl.Add(Scanner.Values.AsString); + sl.Add('==================================='); + sl.Add('IsUnit='+dbgs(Scanner.IsUnit)); + sl.Add('SourceName='+Scanner.SourceName); + sl.Add('==================================='); + sl.Add('Links:'); + for i:=0 to Scanner.LinkCount-1 do begin + Link:=Scanner.Links[i]; + s:=dbgs(i)+'/'+dbgs(Scanner.LinkCount)+': Kind='+dbgs(Link.Kind); + if Link.Code<>nil then + s+=',Code='+ExtractFileName(TCodeBuffer(Link.Code).Filename); + s+=',CleanedPos='+dbgs(Link.CleanedPos)+',SrcPos='+dbgs(Link.SrcPos); + LinkSize:=Scanner.LinkSize(i); + s+=',Size='+dbgs(LinkSize); + if LinkSize>60 then + s+=dbgstr(Scanner.CleanedSrc,Link.CleanedPos,30)+'...'+dbgstr(Scanner.CleanedSrc,Link.CleanedPos+LinkSize-30,30) + else + s+=dbgstr(Scanner.CleanedSrc,Link.CleanedPos,LinkSize); + sl.Add(s); + end; + sl.Add('==================================='); + end; + LinksMemo.Lines.Assign(sl); + finally + sl.Free; + end; end; {$R *.lfm} diff --git a/components/codetools/ide/codystrconsts.pas b/components/codetools/ide/codystrconsts.pas index 44ddb6b186..84c7e45982 100644 --- a/components/codetools/ide/codystrconsts.pas +++ b/components/codetools/ide/codystrconsts.pas @@ -73,6 +73,7 @@ resourcestring crsProjectOutput = 'Project Output'; crsHelp = '&Help'; crsClose = '&Close'; + crsLinks = 'Links'; crsCodeBuffers = 'CodeBuffers'; crsAddAssignMethod = 'Add Assign Method'; crsShowCodeToolsNodeInfo = 'Show CodeTools Node Info ...'; diff --git a/components/codetools/ide/languages/codystrconsts.ar.po b/components/codetools/ide/languages/codystrconsts.ar.po index d000816697..bbdfafd253 100644 --- a/components/codetools/ide/languages/codystrconsts.ar.po +++ b/components/codetools/ide/languages/codystrconsts.ar.po @@ -393,6 +393,10 @@ msgstr "ك بايت" msgid "Linked files" msgstr "الملفات المرتبطة" +#: codystrconsts.crslinks +msgid "Links" +msgstr "" + #: codystrconsts.crsloaddictionaryafter msgid "Load dictionary after %s" msgstr "" diff --git a/components/codetools/ide/languages/codystrconsts.de.po b/components/codetools/ide/languages/codystrconsts.de.po index 54f888ae3b..4a461ea794 100644 --- a/components/codetools/ide/languages/codystrconsts.de.po +++ b/components/codetools/ide/languages/codystrconsts.de.po @@ -389,6 +389,10 @@ msgstr "" msgid "Linked files" msgstr "" +#: codystrconsts.crslinks +msgid "Links" +msgstr "" + #: codystrconsts.crsloaddictionaryafter msgid "Load dictionary after %s" msgstr "Lade Wörterbuch nach %s" diff --git a/components/codetools/ide/languages/codystrconsts.it.po b/components/codetools/ide/languages/codystrconsts.it.po index d10fd87d66..2bd94503cc 100644 --- a/components/codetools/ide/languages/codystrconsts.it.po +++ b/components/codetools/ide/languages/codystrconsts.it.po @@ -389,6 +389,10 @@ msgstr "Kbyte" msgid "Linked files" msgstr "" +#: codystrconsts.crslinks +msgid "Links" +msgstr "" + #: codystrconsts.crsloaddictionaryafter msgid "Load dictionary after %s" msgstr "" diff --git a/components/codetools/ide/languages/codystrconsts.lt.po b/components/codetools/ide/languages/codystrconsts.lt.po index de31f19d20..bc98ee0a2a 100644 --- a/components/codetools/ide/languages/codystrconsts.lt.po +++ b/components/codetools/ide/languages/codystrconsts.lt.po @@ -391,6 +391,10 @@ msgstr "kiB" msgid "Linked files" msgstr "Saistyti failai" +#: codystrconsts.crslinks +msgid "Links" +msgstr "" + #: codystrconsts.crsloaddictionaryafter msgid "Load dictionary after %s" msgstr "Žodyną įkelti po %s" diff --git a/components/codetools/ide/languages/codystrconsts.po b/components/codetools/ide/languages/codystrconsts.po index 3a451393b6..17c4b17a79 100644 --- a/components/codetools/ide/languages/codystrconsts.po +++ b/components/codetools/ide/languages/codystrconsts.po @@ -381,6 +381,10 @@ msgstr "" msgid "Linked files" msgstr "" +#: codystrconsts.crslinks +msgid "Links" +msgstr "" + #: codystrconsts.crsloaddictionaryafter msgid "Load dictionary after %s" msgstr "" diff --git a/components/codetools/ide/languages/codystrconsts.pt_BR.po b/components/codetools/ide/languages/codystrconsts.pt_BR.po index 1c5df501ed..e60eef8541 100644 --- a/components/codetools/ide/languages/codystrconsts.pt_BR.po +++ b/components/codetools/ide/languages/codystrconsts.pt_BR.po @@ -398,6 +398,10 @@ msgstr "kbytes" msgid "Linked files" msgstr "Arquivos vinculados" +#: codystrconsts.crslinks +msgid "Links" +msgstr "" + #: codystrconsts.crsloaddictionaryafter msgid "Load dictionary after %s" msgstr "Carregar dicionário após %s" diff --git a/components/codetools/ide/languages/codystrconsts.ru.po b/components/codetools/ide/languages/codystrconsts.ru.po index a45b0c60f0..d5833703f7 100644 --- a/components/codetools/ide/languages/codystrconsts.ru.po +++ b/components/codetools/ide/languages/codystrconsts.ru.po @@ -399,6 +399,10 @@ msgstr "кБ" msgid "Linked files" msgstr "Скомпонованные файлы" +#: codystrconsts.crslinks +msgid "Links" +msgstr "" + #: codystrconsts.crsloaddictionaryafter msgid "Load dictionary after %s" msgstr "Загружать словарь спустя %s" diff --git a/components/codetools/ide/languages/codystrconsts.uk.po b/components/codetools/ide/languages/codystrconsts.uk.po index 46fdac2217..c23def4667 100644 --- a/components/codetools/ide/languages/codystrconsts.uk.po +++ b/components/codetools/ide/languages/codystrconsts.uk.po @@ -401,6 +401,10 @@ msgstr "кБ" msgid "Linked files" msgstr "Зв'язані файли" +#: codystrconsts.crslinks +msgid "Links" +msgstr "" + #: codystrconsts.crsloaddictionaryafter msgid "Load dictionary after %s" msgstr ""