[DEVELOPMENT ENVIRONMENT]

* NEW: Add a close button to the debug panel.
* NEW: Don't show space dots in the console.
* NEW: Do automatic completion while typing strings.
* BUG: Don't erase component file if you open the project properties 
  dialog without selecting the information tab.


git-svn-id: svn://localhost/gambas/trunk@7042 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2015-04-18 11:45:35 +00:00
parent 075eb91ce8
commit f799695113
12 changed files with 64 additions and 34 deletions

View file

@ -346,7 +346,8 @@ Public Sub _new(sComponent As String, sClass As String, sName As String, sKind A
Catch
Debug sComponent; ": "; sClass; "."; sName; ": "; Error.Text
Error "gambas3: "; sComponent; ": "; sClass; "."; sName; ": "; Error.Text
'Error Error.Backtrace.Join(" ")
'hSym = CComponent.Classes["System"].Symbols["Language"]
Type = "s"

View file

@ -628,6 +628,8 @@ Public Sub ReadConfig()
' Next
btnLocalLayout.Value = Settings["/FDebugInfo/LocalColumnView", 0]
Form_Arrange
End
Public Sub AddBreakpoint(sName As String, sProc As String, iLine As Integer, bOn As Boolean)
@ -1500,3 +1502,19 @@ Public Sub tabDebug_Close(Index As Integer)
Endif
End
Public Sub Form_Arrange()
Dim H As Integer
H = tabDebug.H - tabDebug.ClientHeight - 1
btnClose.Move(Me.W - H, 0, H, H)
btnClose.Raise
End
Public Sub btnClose_Click()
FMain.ShowDebug(False)
End

View file

@ -271,4 +271,10 @@
Index = 0
}
}
{ btnClose ToolButton
MoveScaled(1,1,4,4)
Background = Color.Background
Ignore = True
Picture = Picture["icon:/small/close"]
}
}

View file

@ -29,6 +29,7 @@ Public Sub _new()
edtOutput.Styles[Highlight.Keyword].Foreground = Color.Blue
edtOutput.Overwrite = True
edtOutput.Flags[Editor.AlwaysShowCursor] = True
edtOutput.Flags[Editor.ShowDots] = False
End

View file

@ -1,5 +1,7 @@
' Gambas class file
Public Const GAMBAS As String = "g"
Property Read Enabled As Boolean
Private $hModule As Object

View file

@ -66,12 +66,11 @@ Public Sub Open(hForm As Object, sMode As String, Optional sClass As String, Opt
$hForm = hForm
$hEditor = hForm.GetEditor()
Me.Font = $hEditor.font
$bGambas = hForm Is FEditor
Inc Application.Busy
$bUserChoice = False
$sMode = sMode
$sMode = Left(sMode)
$iLen = 0
$iMaxLen = 16
$iCol = $hEditor.Column + 1
@ -82,6 +81,7 @@ Public Sub Open(hForm As Object, sMode As String, Optional sClass As String, Opt
Select $sMode
Case "."
$bGambas = True
$sText = ""
If String.Len(sClass) = 1 Then
Dec Application.Busy
@ -90,19 +90,23 @@ Public Sub Open(hForm As Object, sMode As String, Optional sClass As String, Opt
$sClass = sClass
FillWithSymbol(sClass, bStatic, bPrivate)
Case " "
$bGambas = True
$sText = ""
FillWithClasses
Case "A"
Case "A", "I"
$bGambas = $sMode = "A"
$sText = sClass
$iLen = String.Len(sClass)
$iCol -= String.Len(sClass)
FillWithIdent(sClass)
Case "_"
$bGambas = True
$sText = "_"
$iLen = 1
Dec $iCol
FillWithSpecial()
Case "<"
$bGambas = $hEditor Is FEditor
$sText = sClass
iPos = String.InStr(sClass, "_")
If iPos Then
@ -113,6 +117,7 @@ Public Sub Open(hForm As Object, sMode As String, Optional sClass As String, Opt
$iCol -= String.Len(sClass) + 2
FillWithIdent(String.Left$(sClass, $iLen))
Case "/"
$bGambas = False
iPos = String.RInStr(sClass, "/")
$sText = String.Mid$(sClass, iPos + 1)
$iLen = String.Len($sText)

View file

@ -2001,7 +2001,7 @@ Public Sub CheckCompletion(sMode As String)
Else If sMode = "A" Then
If GetRightString(sLine) Then Return
If GetRightString(sLine) Then sMode = "I"
If Not FCompletion.VisibleFrom(Editor) Then
sWord = $hCompletion.GetWord(sLine & Key.Text, Editor.Column + 1)

View file

@ -1321,11 +1321,9 @@ Public Sub CheckCompletion(sMode As String)
'
If sMode = "A" Then
If GetRightString(sLine) Then Return
If Not FCompletion.VisibleFrom(Editor) Then
sWord = $hCompletion.GetWord(sLine & Key.Text, Editor.Column + 1)
If String.Len(sWord) >= 3 Then FCompletion.Open(Me, sMode, sWord)
If String.Len(sWord) >= 3 Then FCompletion.Open(Me, "I", sWord)
'IF Len(sWord) >= 3 THEN DEBUG FindCompletion(sWord).Join(" ")
Endif

View file

@ -1,7 +1,7 @@
# Gambas Form File 3.0
{ Form Form
MoveScaled(0,0,174,100)
MoveScaled(0,0,174,103)
Icon = Picture["img/logo/logo-ide.png"]
Arrangement = Arrange.Vertical
{ mnuFile Menu

View file

@ -33,13 +33,13 @@ Public Sub _new(hList As ScrollView, hFilter As ButtonBox, iType As Integer, Opt
$hButton.Ignore = True
$hButton.Hide
$hButton.Text = ("Open in another window") & "…"
$hButton.ResizeScaled(3, 3)
$hButton.Padding = 8
$hButton.ResizeScaled(1, 1)
$hButton.Padding = 4
$hButton.AutoResize = True
$hButton.Font.Grade = -2
$hButton.Font.Grade = -1
$hButton.Mouse = Mouse.Pointing
$hButton.Border = False
$hButton.Foreground = &HE0E0E0&
$hButton.Foreground = Color.LightBackground
End
@ -437,13 +437,13 @@ End
Public Sub Button_Enter()
$hButton.Foreground = Color.LinkForeground
$hButton.Foreground = Color.SelectedBackground
End
Public Sub Button_Leave()
$hButton.Foreground = &HE0E0E0&
$hButton.Foreground = Color.LightBackground
End
@ -460,7 +460,7 @@ Public Sub ProjectItem_Enter()
If Not $bOpenExtern Then Return
hProject = Last
$hButton.Reparent(hProject.Children[0])
$hButton.Move(hProject.W - $hButton.W, hProject.H - $hButton.H)
$hButton.Move(3, hProject.H - $hButton.H - 3, hProject.W - 6, $hButton.H)
$hButton.Show
End

View file

@ -1045,24 +1045,23 @@ Private Sub WriteComponent()
Dim cComp As New Collection
If Project.Type <> Project.TYPE_NORMAL Then
If $bInitInfo Then
cComp["State"] = cmbComponentState.Index
$aNeed.Clear
WriteFeatures(panNeed, $aNeed)
WriteFeatures(panNeed2, $aNeed)
cComp["Hidden"] = cmbHidden.Index = 0
cComp["Implement"] = $aImplement
cComp["Need"] = $aNeed
cComp["Require"] = $aRequire
cComp["Exclude"] = $aExclude
If chkCompat.Value Then cComp["CompatibleUntil"] = CStr(txtMajor.Value) & "." & CStr(txtMinor.Value) & "." & CStr(txtRelease.Value)
cComp["Include"] = Split(Trim(txtIncludeInfo.Text))
Endif
' If the component information has not been initialized, do nothing, don't erase the component file!
If Not $bInitInfo Then Return
cComp["State"] = cmbComponentState.Index
$aNeed.Clear
WriteFeatures(panNeed, $aNeed)
WriteFeatures(panNeed2, $aNeed)
cComp["Hidden"] = cmbHidden.Index = 0
cComp["Implement"] = $aImplement
cComp["Need"] = $aNeed
cComp["Require"] = $aRequire
cComp["Exclude"] = $aExclude
If chkCompat.Value Then cComp["CompatibleUntil"] = CStr(txtMajor.Value) & "." & CStr(txtMinor.Value) & "." & CStr(txtRelease.Value)
cComp["Include"] = Split(Trim(txtIncludeInfo.Text))
Endif

View file

@ -65,6 +65,7 @@
5 Enrico Righetto
5 Franck Tomesch
5 Salim Safran
5 Gianluigi Gradaschi
4 James Skagg
4 Frank Berg
4 Robin Hahn
@ -97,7 +98,6 @@
3 Laurent Gallego
3 Milton Gallinger
3 Eric Villeminot
3 Gianluigi Gradaschi
3 Evan Owen
3 DaifNet
3 Alessandri Guzman Abad