[DEVELOPMENT ENVIRONMENT]
* NEW: Make debugging positions in the output window links to the source code. I should make that optional by the way... git-svn-id: svn://localhost/gambas/trunk@6320 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
648e9402f5
commit
6fcc3e4b17
@ -202,15 +202,7 @@ Public Sub lvwStack_Click()
|
||||
sLoc = lvwStack.Current.Text
|
||||
If InStr(sLoc, "(") Then Return
|
||||
|
||||
iPos = InStr(sLoc, ".")
|
||||
If iPos = 0 Then Return
|
||||
sFile = Left$(sLoc, iPos - 1)
|
||||
|
||||
iPos = RInStr(sLoc, ".")
|
||||
If iPos = 0 Then Return
|
||||
iLine = Val(Mid$(sLoc, iPos + 1))
|
||||
|
||||
If Project.ExistClass(sFile) Then Project.OpenFile(sFile, iLine)
|
||||
Project.Goto(sLoc)
|
||||
|
||||
Catch
|
||||
|
||||
|
@ -5,6 +5,10 @@ Private $bGotError As Boolean
|
||||
Private $iHistory As Integer
|
||||
Private $sCurrent As String
|
||||
|
||||
Private $iLinkY As Integer
|
||||
Private $iLinkX As Integer
|
||||
Private $iLinkLen As Integer
|
||||
|
||||
'PUBLIC Shown AS Boolean
|
||||
|
||||
Public Sub _new()
|
||||
@ -20,6 +24,10 @@ Public Sub _new()
|
||||
btnEcho.Value = Settings["/FOutput/Echo", False]
|
||||
OnProjectDebug
|
||||
|
||||
edtOutput.Styles[Highlight.Keyword].Underline = True
|
||||
edtOutput.Styles[Highlight.Keyword].Bold = False
|
||||
edtOutput.Styles[Highlight.Keyword].Foreground = Color.Blue
|
||||
|
||||
End
|
||||
|
||||
|
||||
@ -380,3 +388,80 @@ Public Sub btnEcho_Click()
|
||||
Settings["/FOutput/Echo"] = btnEcho.Value
|
||||
|
||||
End
|
||||
|
||||
Public Sub edtOutput_Highlight()
|
||||
|
||||
If $iLinkLen = 0 Then Return
|
||||
If $iLinkY <> Highlight.Line Then Return
|
||||
|
||||
Highlight.Add(Highlight.Keyword, $iLinkLen)
|
||||
|
||||
End
|
||||
|
||||
Public Sub edtOutput_MouseMove()
|
||||
|
||||
Dim X, Y As Integer
|
||||
Dim sText As String
|
||||
Dim iPos As Integer
|
||||
Dim aScan As String[]
|
||||
Dim iNewX As Integer
|
||||
Dim iNewY As Integer
|
||||
Dim iNewLen As Integer
|
||||
|
||||
X = edtOutput.PosToColumn(Mouse.X, Mouse.Y)
|
||||
Y = edtOutput.PosToLine(Mouse.Y)
|
||||
|
||||
If Y >= 0 And If X >= 0 Then
|
||||
|
||||
sText = edtOutput.Lines[Y].Text
|
||||
|
||||
iPos = InStr(sText, ": ")
|
||||
If iPos Then
|
||||
aScan = Scan(Left(sText, iPos - 1), "*.*.*")
|
||||
If aScan.Count = 3 And If IsDigit(aScan[2]) Then
|
||||
iNewY = Y
|
||||
iNewX = 0
|
||||
iNewLen = iPos - 1
|
||||
Endif
|
||||
Endif
|
||||
Endif
|
||||
|
||||
If $iLinkLen Then
|
||||
$iLinkLen = 0
|
||||
edtOutput.Lines[$iLinkY].Refresh
|
||||
Endif
|
||||
|
||||
If iNewLen Then
|
||||
$iLinkX = iNewX
|
||||
$iLinkY = iNewY
|
||||
$iLinkLen = iNewLen
|
||||
edtOutput.Lines[iNewY].Refresh
|
||||
Endif
|
||||
|
||||
If $iLinkLen Then
|
||||
edtOutput.Mouse = Mouse.Pointing
|
||||
Else
|
||||
edtOutput.Mouse = Mouse.Default
|
||||
Endif
|
||||
|
||||
End
|
||||
|
||||
Public Sub edtOutput_Leave()
|
||||
|
||||
If $iLinkLen Then
|
||||
$iLinkLen = 0
|
||||
edtOutput.Lines[$iLinkY].Refresh
|
||||
Endif
|
||||
|
||||
End
|
||||
|
||||
Public Sub edtOutput_MouseDown()
|
||||
|
||||
If $iLinkLen And If Mouse.Normal Then
|
||||
If Not Project.Goto(Left$(edtOutput.Lines[$iLinkY].Text, $iLinkLen)) Then
|
||||
Stop Event
|
||||
Endif
|
||||
Endif
|
||||
|
||||
End
|
||||
|
||||
|
@ -127,9 +127,11 @@
|
||||
}
|
||||
{ edtOutput Editor
|
||||
MoveScaled(1,9,38,34)
|
||||
Tracking = True
|
||||
NoTabFocus = True
|
||||
Expand = True
|
||||
Border = False
|
||||
Highlight = Highlight.Custom
|
||||
ReadOnly = True
|
||||
}
|
||||
{ Separator2 Separator
|
||||
|
@ -5666,3 +5666,20 @@ Catch
|
||||
Message.Error("<b>Unable to update all forms!</b><p>" & Error.Text & "<br>" & Error.Where)
|
||||
|
||||
End
|
||||
|
||||
Public Sub Goto(sPosition As String) As Boolean
|
||||
|
||||
Dim aScan As String[]
|
||||
Dim sClass As String
|
||||
Dim iLine As Integer
|
||||
|
||||
aScan = Scan(sPosition, "*.*.*")
|
||||
If aScan.Count <> 3 Then Return True
|
||||
|
||||
sClass = aScan[0]
|
||||
Try iLine = CInt(aScan[2])
|
||||
If Error Then Return True
|
||||
|
||||
If ExistClass(sClass) Then OpenFile(sClass, iLine)
|
||||
|
||||
End
|
||||
|
Loading…
x
Reference in New Issue
Block a user