diff --git a/app/src/gambas3/.src/Component/CComponent.class b/app/src/gambas3/.src/Component/CComponent.class index 3cdb66f46..1326ce555 100644 --- a/app/src/gambas3/.src/Component/CComponent.class +++ b/app/src/gambas3/.src/Component/CComponent.class @@ -674,7 +674,8 @@ Static Private Sub ScanClass(hModule As Object, cSymbol As Collection, bModule A Dim sLine As String Dim iPos As Integer Dim sSign As String - + Dim iLastHelpLine As Integer + Dim bIsSameHelpBlock As Boolean 'Debug "ScanClass "; hModule.Name 'DEBUG "> "; hModule.Name @@ -703,6 +704,15 @@ Static Private Sub ScanClass(hModule As Object, cSymbol As Collection, bModule A aSym = Highlight.Analyze(hEditor.Lines[iLine].Text) If aSym.Count = 0 Then Continue + 'Gestion de l'aide + If Left(aSym[0], 2) = "''" And iLastHelpLine < iLine Then + If Not bIsSameHelpBlock Then iLastHelpLine = iLine + bIsSameHelpBlock = True + Else + bIsSameHelpBlock = False + Endif + + If aSym.Count = 2 Then If bCanInherit Then If aSym[0] = "INHERITS" Then @@ -785,7 +795,7 @@ Static Private Sub ScanClass(hModule As Object, cSymbol As Collection, bModule A .Kind = sKind .NotPublic = Not bPublic .LineNumber = iLine + 1 - .HelpLineNumber = GetHelpLine(iLine, hEditor) + .HelpLineNumber = iLastHelpLine If sKind = "m" Then For iStart = iInd + 1 To aSym.Count - 1 diff --git a/app/src/gambas3/.src/Debug/FHelp.class b/app/src/gambas3/.src/Debug/FHelp.class index d3089517e..a5cae95a2 100644 --- a/app/src/gambas3/.src/Debug/FHelp.class +++ b/app/src/gambas3/.src/Debug/FHelp.class @@ -142,14 +142,26 @@ End Private Function GetLocalHelp(hSymbol As CSymbolInfo) As String Dim hForm As Object Dim hEdit As Editor - Dim sClass As String + Dim sClass, sResult, s As String + Dim iLine As Integer + sClass = Project.FindPath(hSymbol.Class) hForm = Project.LoadFile(sClass) Try hEdit = hForm.Editor If Not hEdit Then Return 'hEdit.Goto(hSymbol.HelpLineNumber, 0) - If hSymbol.HelpLineNumber Then Return Mid(LTrim(hEdit.Lines[hSymbol.HelpLineNumber].Text), 2) - - + If hSymbol.HelpLineNumber Then + iLine = hSymbol.HelpLineNumber + sResult = "Syntax
" + sResult &= hSymbol.Name & hSymbol.GetSignature(0) & "

" + Do + s = LTrim(hEdit.Lines[iLine].Text) + If Left(s, 2) <> "''" Then Break + sResult &= Mid(s, 3) & "
" + Inc iLine + If iLine >= hEdit.Lines.Count Then Break + Loop + Return sResult + Endif End