From 4257bd705f22c62148dab6b8fa10084cf0017e7e Mon Sep 17 00:00:00 2001 From: John Peel Date: Tue, 24 Sep 2013 00:08:07 -0400 Subject: [PATCH] Simba: Fixed issues with Plugins in Function List. Plugins will now go in Plugins Section when loaded from any file. Tried adding a fix for changing your defines count. --- Projects/Simba/framefunctionlist.pas | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Projects/Simba/framefunctionlist.pas b/Projects/Simba/framefunctionlist.pas index 4f520d5a6..2f8b8bf95 100644 --- a/Projects/Simba/framefunctionlist.pas +++ b/Projects/Simba/framefunctionlist.pas @@ -533,7 +533,7 @@ procedure TFunctionListFrame.FunctionListMouseDown(Sender: TObject; exit; end; Self.DragKind := dkDrag; - if(Button = mbLeft) and (N.Level > 0)then + if ((Button = mbLeft) and (N.Level > 0) and (N.Parent <> PluginsNode)) then Self.BeginDrag(False, 10); DraggingNode := N; end; @@ -670,7 +670,15 @@ procedure TFillThread.Update; AddProcsTree(ParentNode, Include.Items, Include.FileName); for I := 0 to High(Include.Includes) do - AddInclude(ParentNode.Parent, Include.Includes[I]); + if (isLib(Include.Includes[I])) then + AddInclude(PluginsNode, Include.Includes[I]) + else + AddInclude(ParentNode.Parent, Include.Includes[I]); + end; + + function getCount(Analyzer: TCodeInsight): LongWord; + begin + Result := Length(Analyzer.Includes) + Analyzer.Lexer.Defines.Count; end; var @@ -678,7 +686,7 @@ procedure TFillThread.Update; begin AddProcsTree(ScriptNode, Analyzer.Items, Analyzer.FileName); - if (LastIncludeCount^ <> Length(Analyzer.Includes)) then + if (LastIncludeCount^ <> getCount(Analyzer)) then begin PluginsNode.DeleteChildren; IncludesNode.DeleteChildren; @@ -689,7 +697,7 @@ procedure TFillThread.Update; else AddInclude(IncludesNode, Analyzer.Includes[I]); - LastIncludeCount^ := Length(Analyzer.Includes); + LastIncludeCount^ := getCount(Analyzer); end; end;