2010-01-10 02:16 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbide/hbide.prg
  * contrib/hbide/idedocks.prg
  * contrib/hbide/ideeditor.prg
  * contrib/hbide/ideobject.prg
  * contrib/hbide/ideprojmanager.prg
  * contrib/hbide/idesources.prg
  * contrib/hbide/idethemes.prg
  * contrib/hbide/resources/projectproperties.ui
    ! Some fixes and code optimizations.
      Please report if some feature is not working ok.
This commit is contained in:
Pritpal Bedi
2010-01-10 10:18:51 +00:00
parent 0b4cbe9923
commit 486047b99a
9 changed files with 164 additions and 156 deletions

View File

@@ -17,6 +17,18 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-01-10 02:16 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/hbide.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/ideobject.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idesources.prg
* contrib/hbide/idethemes.prg
* contrib/hbide/resources/projectproperties.ui
! Some fixes and code optimizations.
Please report if some feature is not working ok.
2010-01-09 15:39 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/hbide.ch
* contrib/hbide/hbide.hbp

View File

@@ -116,19 +116,19 @@ CLASS HbIde
DATA oPM /* Project Manager */
DATA oDK /* Main Window Components Manager */
DATA oAC /* Actions Manager */
DATA oED /* Editor Tabs Manager */
DATA oEM /* Editor Tabs Manager */
DATA oSM /* Souces Manager */
DATA oFR /* Find Replace Manager */
DATA aMeta INIT {} /* Holds current definition only */
DATA aMeta INIT {} /* Holds current definition only */
DATA mp1, mp2, oXbp, nEvent
DATA aTabs INIT {}
DATA aTabs INIT {}
DATA cProjIni
DATA oCurTab INIT NIL
DATA nCurTab INIT 0
DATA aIni INIT {}
DATA oCurTab INIT NIL
DATA nCurTab INIT 0
DATA aIni INIT {}
/* HBQT Objects */
DATA qLayout
@@ -174,41 +174,40 @@ CLASS HbIde
DATA oExes
DATA oLibs
DATA oDlls
DATA aProjData INIT {}
DATA aPrpObjs INIT {}
DATA aEditorPath INIT {}
DATA aProjData INIT {}
DATA aPrpObjs INIT {}
DATA aEditorPath INIT {}
DATA lProjTreeVisible INIT .t.
DATA lDockRVisible INIT .f.
DATA lDockBVisible INIT .f.
DATA lTabCloseRequested INIT .f.
DATA lProjTreeVisible INIT .t.
DATA lDockRVisible INIT .f.
DATA lDockBVisible INIT .f.
DATA lTabCloseRequested INIT .f.
DATA cSaveTo INIT ""
DATA cSaveTo INIT ""
DATA oOpenedSources
DATA resPath INIT hb_DirBase() + "resources" + hb_OsPathSeparator()
DATA pathSep INIT hb_OsPathSeparator()
DATA resPath INIT hb_DirBase() + "resources" + hb_OsPathSeparator()
DATA pathSep INIT hb_OsPathSeparator()
DATA aTags INIT {}
DATA aText INIT {}
DATA aSources INIT {}
DATA aFuncList INIT {}
DATA aLines INIT {}
DATA aComments INIT {}
DATA aProjects INIT {}
DATA cWrkProject INIT ''
DATA cWrkTheme INIT ''
DATA aTags INIT {}
DATA aText INIT {}
DATA aSources INIT {}
DATA aFuncList INIT {}
DATA aLines INIT {}
DATA aComments INIT {}
DATA aProjects INIT {}
DATA cWrkProject INIT ''
DATA cWrkTheme INIT ''
DATA oProps
DATA cProcessInfo
DATA qProcess
DATA aEdits INIT {}
DATA aEdits INIT {}
DATA cIniThemes
DATA oThemes
METHOD new( cProjectOrSource )
METHOD create( cProjectOrSource )
METHOD destroy()
@@ -216,29 +215,21 @@ CLASS HbIde
METHOD setPosAndSizeByIni()
METHOD setPosByIni()
METHOD setSizeByIni()
METHOD execAction()
METHOD manageFuncContext()
METHOD manageProjectContext()
METHOD updateFuncList()
METHOD gotoFunction()
METHOD updateProjectMenu()
METHOD updateProjectTree()
METHOD manageItemSelected()
METHOD getCurrentTab()
METHOD getCurCursor()
METHOD addSourceInTree()
METHOD createTags()
METHOD manageFocusInEditor()
METHOD loadUI()
METHOD setCodec()
METHOD updateTitleBar()
ENDCLASS
@@ -273,34 +264,35 @@ METHOD HbIde:create( cProjIni )
/* Load IDE Settings */
hbide_loadINI( Self, cProjIni )
/* Setup DOCKing windows and ancilliary windows */
/* DOCKing windows and ancilliary windows */
::oDK := IdeDocks():new():create( Self )
/* Build IDE's Main Window */
/* IDE's Main Window */
::oDK:buildDialog()
/* Build Actions */
/* Actions */
::oAC := IdeActions():new( Self ):create()
/* Build Toolbar */
/* Toolbar */
::oAC:buildToolBar()
/* Build Main Menu */
/* Main Menu */
::oAC:buildMainMenu()
//::oDK:buildMainMenu()
/* StatusBar */
::oDK:buildStatusBar()
/* Docking Widgets */
::oDK:buildDockWidgets()
/* Once create Find/Replace dialog */
::oFR := IdeFindReplace():new():create( Self )
::oFR := IdeFindReplace():new( Self ):create()
/* Sources Manager */
::oSM := IdeSourcesManager():new( Self ):create()
/* Edits Manager */
::oED := IdeEditsManager():new( Self ):create()
::oEM := IdeEditsManager():new( Self ):create()
/* Load IDE|User defined Themes */
hbide_loadThemes( Self )
/* Prepare Editor's Tabs */
::oED:prepareTabWidget()
::oEM:prepareTabWidget()
/* Attach GRID Layout to Editor Area - Futuristic */
::qLayout := QGridLayout():new()
@@ -365,7 +357,7 @@ METHOD HbIde:create( cProjIni )
::oSM:closeSource()
CASE ::mp1 == xbeK_CTRL_G
::oED:goto()
::oEM:goto()
CASE ::mp1 == xbeK_CTRL_F
IF !empty( ::qCurEdit )
@@ -436,7 +428,7 @@ METHOD HbIde:execAction( cKey )
::oPM:buildProject( '', .F., .F., .T., .T. )
CASE cKey == "Properties"
IF Empty( ::cWrkProject )
MsgBox( 'No active project detected!' )
MsgBox( 'No active project detected' )
ENDIF
cTmp := ::oPM:getCurrentProject()
IF ( n := ascan( ::aProjects, {|e_| e_[ 3, PRJ_PRP_PROPERTIES, 2, E_oPrjTtl ] == cTmp } ) ) > 0
@@ -458,7 +450,7 @@ METHOD HbIde:execAction( cKey )
CASE cKey == "Open"
::oSM:openSource()
CASE cKey == "Save"
::saveSource( ::getCurrentTab(), .f., .f. )
::oSM:saveSource( ::getCurrentTab(), .f., .f. )
CASE cKey == "SaveAs"
::oSM:saveSource( ::getCurrentTab(), .t., .t. )
CASE cKey == "SaveAll"
@@ -475,22 +467,22 @@ METHOD HbIde:execAction( cKey )
::oSM:closeAllOthers()
CASE cKey == "Print"
::oED:printPreview()
::oEM:printPreview()
CASE cKey == "Undo"
::oED:undo()
::oEM:undo()
CASE cKey == "Redo"
::oED:redo()
::oEM:redo()
CASE cKey == "Cut"
::oED:cut()
::oEM:cut()
CASE cKey == "Copy"
::oED:copy()
::oEM:copy()
CASE cKey == "Paste"
::oED:paste()
::oEM:paste()
CASE cKey == "SelectAll"
::oED:selectAll()
::oEM:selectAll()
CASE cKey == "switchReadOnly"
::oED:switchToReadOnly()
::oEM:switchToReadOnly()
CASE cKey == "Find"
IF !Empty( ::qCurEdit )
::oFR:show()
@@ -500,23 +492,23 @@ METHOD HbIde:execAction( cKey )
CASE cKey == "GotoMark"
//
CASE cKey == "Goto"
::oED:goto()
::oEM:goto()
CASE cKey == "ToUpper"
::oED:convertSelection( cKey )
::oEM:convertSelection( cKey )
CASE cKey == "ToLower"
::oED:convertSelection( cKey )
::oEM:convertSelection( cKey )
CASE cKey == "Invert"
::oED:convertSelection( cKey )
::oEM:convertSelection( cKey )
CASE cKey == "InsertDateTime"
::oED:insertText( cKey )
::oEM:insertText( cKey )
CASE cKey == "InsertRandomName"
::oED:insertText( cKey )
::oEM:insertText( cKey )
CASE cKey == "InsertExternalFile"
::oED:insertText( cKey )
::oEM:insertText( cKey )
CASE cKey == "ZoomIn"
::oED:zoom( cKey )
::oEM:zoom( cKey )
CASE cKey == "ZoomOut"
::oED:zoom( cKey )
::oEM:zoom( cKey )
CASE cKey == "ToggleProjectTree"
::oDK:toggleLeftDocks()
@@ -796,10 +788,10 @@ METHOD HbIde:manageItemSelected( oXbpTreeItem )
::oPM:loadProperties( cHbi, .f., .t., .f. )
CASE ::aProjData[ n, TRE_TYPE ] == "Source File"
::editSource( ::aProjData[ n, TRE_ORIGINAL ] )
::oSM:editSource( ::aProjData[ n, TRE_ORIGINAL ] )
CASE ::aProjData[ n, TRE_TYPE ] == "Opened Source"
::oED:setSourceVisible( ::aProjData[ n, TRE_DATA ] )
::oEM:setSourceVisible( ::aProjData[ n, TRE_DATA ] )
CASE ::aProjData[ n, TRE_TYPE ] == "Path"
@@ -864,11 +856,11 @@ METHOD HbIde:manageProjectContext( mp1, mp2, oXbpTreeItem )
cSource := ::aProjData[ n, 5 ]
n := ascan( ::aTabs, {|e_| hbide_pathNormalized( e_[ 5 ] ) == cSource } )
//
aadd( aPops, { "Save" , {|| ::saveSource( n ) } } )
aadd( aPops, { "Save As" , {|| ::saveSource( n, , .t. ) } } )
aadd( aPops, { "Save" , {|| ::oSM:saveSource( n ) } } )
aadd( aPops, { "Save As" , {|| ::oSM:saveSource( n, , .t. ) } } )
aadd( aPops, { "" } )
aadd( aPops, { "Close" , {|| ::closeSource( n ) } } )
aadd( aPops, { "Close Others" , {|| ::closeAllOthers( n ) } } )
aadd( aPops, { "Close" , {|| ::oSM:closeSource( n ) } } )
aadd( aPops, { "Close Others" , {|| ::oSM:closeAllOthers( n ) } } )
aadd( aPops, { "" } )
aadd( aPops, { "Apply Theme" , {|| ::aTabs[ n, TAB_OEDITOR ]:applyTheme() } } )
//
@@ -903,7 +895,7 @@ METHOD HbIde:gotoFunction( mp1, mp2, oListBox )
IF ( n := ascan( ::aTags, {|e_| mp2 == e_[ 7 ] } ) ) > 0
cAnchor := trim( ::aText[ ::aTags[ n,3 ] ] )
IF !empty( oEdit := ::oED:getEditorCurrent() )
IF !empty( oEdit := ::oEM:getEditorCurrent() )
IF !( oEdit:qEdit:find( cAnchor, QTextDocument_FindCaseSensitively ) )
oEdit:qEdit:find( cAnchor, QTextDocument_FindBackward + QTextDocument_FindCaseSensitively )
ENDIF
@@ -947,7 +939,7 @@ METHOD HbIde:CreateTags()
aSumData := {}
cComments := CheckComments( ::aText )
aSummary := Summarize( ::aText, cComments, @aSumData , IIf( Upper( cExt ) == ".PRG", 9, 1 ) )
aSummary := Summarize( ::aText, cComments, @aSumData , iif( Upper( cExt ) == ".PRG", 9, 1 ) )
::aTags := UpdateTags( ::aSources[ i ], aSummary, aSumData, @::aFuncList, @::aLines )
#if 0
@@ -1019,7 +1011,7 @@ METHOD HbIde:updateTitleBar()
cTitle += " [" + ::cWrkProject + "] "
ENDIF
IF !empty( oEdit := ::oED:getEditorCurrent() )
IF !empty( oEdit := ::oEM:getEditorCurrent() )
IF Empty( oEdit:sourceFile )
cTitle += "[" + oEdit:oTab:caption + "]"
ELSE

View File

@@ -370,7 +370,7 @@ METHOD IdeDocks:buildOutputResults()
::oDlg:oWidget:addDockWidget_1( Qt_BottomDockWidgetArea, ::oDockB2:oWidget, Qt_Horizontal )
::oDockB2:hide()
Qt_Slots_Connect( ::pSlots, ::oOutputResult:oWidget, "copyAvailable(bool)", {|o,l| ::outputDoubleClicked( l, o ) } )
::connect( ::oIde:oOutputResult:oWidget, "copyAvailable(bool)", {|o,l| ::outputDoubleClicked( l, o ) } )
RETURN Self
@@ -387,7 +387,7 @@ METHOD IdeDocks:outputDoubleClicked( lSelected )
cText := QTextBlock():configure( qCursor:block() ):text()
IF hbide_parseFNfromStatusMsg( cText, @cSource, @nLine, .T. )
::oIde:editSource( cSource, 0, 0, 0, NIL, .f. )
::oEM:editSource( cSource, 0, 0, 0, NIL, .f. )
qCursor := QTextCursor():configure( ::oIde:qCurEdit:textCursor() )
nLine := iif( nLine < 1, 0, nLine - 1 )
@@ -395,6 +395,8 @@ METHOD IdeDocks:outputDoubleClicked( lSelected )
qCursor:movePosition( QTextCursor_Down, QTextCursor_MoveAnchor, nLine )
::oIde:qCurEdit:setTextCursor( qCursor )
::oIde:manageFocusInEditor()
hbide_dbg( "............", cSource, cText )
ENDIF
ENDIF
IF ::nPass >= 2

View File

@@ -305,11 +305,11 @@ METHOD IdeEditsManager:setSourceVisible( cSource )
METHOD IdeEditsManager:setSourceVisibleByIndex( nIndex ) /* nIndex is 0 based */
IF ::qTabWidget:count() > 0 .AND. ::qTabWidget:count() > nIndex
IF ::qTabWidget:count() == 0 .OR. nIndex >= ::qTabWidget:count()
nIndex := 0
ENDIF
::qTabWidget:setCurrentIndex( 0 )
::getEditorByIndex( 0 ):setDocumentProperties()
::qTabWidget:setCurrentIndex( nIndex )
::getEditorByIndex( nIndex ):setDocumentProperties()
RETURN .f.
@@ -727,7 +727,7 @@ METHOD IdeEditor:exeBlock( nMode, p, p1 )
SWITCH nMode
/* QPlainTextEdit */
CASE 1 // "customContextMenuRequested(QPoint)"
IF !empty( pAct := ::oED:qContextMenu:exec_1( ::qEdit:mapToGlobal( p ) ) )
IF !empty( pAct := ::oEM:qContextMenu:exec_1( ::qEdit:mapToGlobal( p ) ) )
qAct := QAction():configure( pAct )
DO CASE
CASE qAct:text() == "Apply Theme"
@@ -784,17 +784,13 @@ METHOD IdeEditor:setDocumentProperties()
qCursor := QTextCursor():configure( ::qEdit:textCursor() )
IF !( ::lLoaded ) /* First Time */
hbide_dbg( "......................................." )
::lLoaded := .T.
::qEdit:setPlainText( hb_memoRead( ::sourceFile ) )
qCursor:setPosition( ::nPos )
::qEdit:setTextCursor( qCursor )
QScrollBar():configure( ::qEdit:horizontalScrollBar() ):setValue( ::nHPos )
QScrollBar():configure( ::qEdit:verticalScrollBar() ):setValue( ::nVPos )
hbide_dbg( "........................................................" )
::qTabWidget:setTabIcon( ::qTabWidget:indexOf( ::oTab:oWidget ), ::resPath + "tabunmodified.png" )
ENDIF
::nBlock := qCursor:blockNumber()
@@ -804,6 +800,7 @@ METHOD IdeEditor:setDocumentProperties()
::oIde:createTags()
::oIde:updateFuncList()
::oIde:updateTitleBar()
::dispEditInfo()
::oIde:manageFocusInEditor()
@@ -817,7 +814,7 @@ METHOD IdeEditor:activateTab( mp1, mp2, oXbp )
HB_SYMBOL_UNUSED( mp1 )
IF !empty( oEdit := ::oED:getEditorByTabObject( oXbp ) )
IF !empty( oEdit := ::oEM:getEditorByTabObject( oXbp ) )
::oIde:nCurTab := mp2
oEdit:setDocumentProperties()
ENDIF
@@ -956,7 +953,7 @@ METHOD IdeEditor:removeTabPage()
IF ::qTabWidget:count() == 0
IF ::lDockRVisible
::oDockR:hide()
::lDockRVisible := .f.
::oIde:lDockRVisible := .f.
ENDIF
ENDIF

View File

@@ -80,7 +80,7 @@ CLASS IdeObject
DATA qContextMenu
ACCESS oFR INLINE ::oIde:oFR
ACCESS oED INLINE ::oIde:oED
ACCESS oEM INLINE ::oIde:oEM
ACCESS oPM INLINE ::oIde:oPM
ACCESS oDK INLINE ::oIde:oDK
ACCESS oAC INLINE ::oIde:oAC
@@ -98,6 +98,8 @@ CLASS IdeObject
ACCESS cWrkTheme INLINE ::oIde:cWrkTheme
ACCESS aProjects INLINE ::oIde:aProjects
ACCESS aINI INLINE ::oIde:aINI
ACCESS aEdits INLINE ::oIde:aEdits
ACCESS aSources INLINE ::oIde:aSources
ACCESS oDlg INLINE ::oIde:oDlg
ACCESS qDlg INLINE ::oIde:oDlg:oWidget
@@ -136,18 +138,32 @@ CLASS IdeObject
ACCESS lTabCloseRequested INLINE ::oIde:lTabCloseRequested
ACCESS oSBar INLINE ::oIde:oSBar
METHOD new() VIRTUAL
METHOD create() VIRTUAL
METHOD destroy() VIRTUAL
DATA aSlots INIT {}
DATA aEvents INIT {}
METHOD connect()
ERROR HANDLER OnError()
METHOD getCurrentTab( ... ) INLINE ::oIde:getCurrentTab( ... )
METHOD getCurCursor( ... ) INLINE ::oIde:getCurCursor( ... )
METHOD createTags( ... ) INLINE ::oIde:createTags( ... )
METHOD addSourceInTree( ... ) INLINE ::oIde:addSourceInTree( ... )
METHOD setPosAndSizeByIni( ... ) INLINE ::oIde:setPosAndSizeByIni( ... )
METHOD setPosByIni( ... ) INLINE ::oIde:setPosByIni( ... )
METHOD setSizeByIni( ... ) INLINE ::oIde:setSizeByIni( ... )
METHOD execAction( ... ) INLINE ::oIde:execAction( ... )
METHOD manageFuncContext( ... ) INLINE ::oIde:manageFuncContext( ... )
METHOD manageProjectContext( ... ) INLINE ::oIde:manageProjectContext( ... )
METHOD updateFuncList( ... ) INLINE ::oIde:updateFuncList( ... )
METHOD gotoFunction( ... ) INLINE ::oIde:gotoFunction( ... )
METHOD updateProjectMenu( ... ) INLINE ::oIde:updateProjectMenu( ... )
METHOD updateProjectTree( ... ) INLINE ::oIde:updateProjectTree( ... )
METHOD manageItemSelected( ... ) INLINE ::oIde:manageItemSelected( ... )
METHOD manageFocusInEditor( ... ) INLINE ::oIde:manageFocusInEditor( ... )
METHOD loadUI( ... ) INLINE ::oIde:loadUI( ... )
METHOD setCodec( ... ) INLINE ::oIde:setCodec( ... )
METHOD updateTitleBar( ... ) INLINE ::oIde:updateTitleBar( ... )
METHOD getCurrentTab() INLINE ::oIde:getCurrentTab()
METHOD editSource( ... ) INLINE ::oIde:oSM:editSource( ... )
METHOD editSource( ... ) INLINE ::oSM:editSource( ... )
METHOD getEditorByIndex( ... ) INLINE ::oSM:getEditorByIndex( ... )
ENDCLASS
@@ -164,22 +180,3 @@ METHOD IdeObject:connect( qWidget, cSlot, bBlock )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeObject:onError( ... )
LOCAL cMsg
cMsg := __GetMessage()
IF SubStr( cMsg, 1, 1 ) == "_"
cMsg := SubStr( cMsg, 2 )
ENDIF
IF left( cMsg, 2 ) == "Q_"
RETURN ::oUI:&cMsg( ... )
ELSE
RETURN ::oIde:&cMsg( ... )
ENDIF
RETURN nil
/*----------------------------------------------------------------------*/

View File

@@ -268,13 +268,13 @@ METHOD IdeProjManager:loadProperties( cProjFileName, lNew, lFetch, lUpdateTree )
IF n == 0
aadd( ::oIde:aProjects, { lower( cProjFileName ), cProjFileName, aclone( ::aPrjProps ) } )
IF lUpdateTree
::updateProjectTree( ::aPrjProps )
::oIde:updateProjectTree( ::aPrjProps )
ENDIF
hbide_mnuAddFileToMRU( ::oIde, cProjFileName, INI_RECENTPROJECTS )
ELSE
::aProjects[ n, 3 ] := aclone( ::aPrjProps )
IF lUpdateTree
::updateProjectTree( ::aPrjProps )
::oIde:updateProjectTree( ::aPrjProps )
ENDIF
IF lUpdateTree .AND. ::aPrjProps[ PRJ_PRP_PROPERTIES, 2, E_qPrjType ] <> t
MsgBox( "::removeProjectFromTree( ::aPrjProps )" )
@@ -307,13 +307,16 @@ METHOD IdeProjManager:fetchProperties()
::oUI:q_comboPrjType:setCurrentIndex( 0 )
ENDCASE
::oUI:signal( "buttonCn" , "clicked()", {|| ::oUI:oWidget:close() } )
::oUI:signal( "buttonSave" , "clicked()", {|| ::save( .F. ) } )
::oUI:signal( "buttonSaveExit", "clicked()", {|| ::save( .T. ) } )
::oUI:signal( "buttonSelect" , "clicked()", {|| ::addSources() } )
::oUI:signal( "tabWidget" , "currentChanged(int)", {|o,p| ::updateHbp( p, o ) } )
::oUI:q_buttonChoosePrjLoc:setIcon( ::resPath + "lookup.png" )
::oUI:q_buttonChooseWd:setIcon( ::resPath + "lookup.png" )
::oUI:q_buttonChooseDest:setIcon( ::resPath + "lookup.png" )
::oUI:signal( "buttonCn" , "clicked()", {|| ::oUI:oWidget:close() } )
::oUI:signal( "buttonSave" , "clicked()", {|| ::save( .F. ) } )
::oUI:signal( "buttonSaveExit" , "clicked()", {|| ::save( .T. ) } )
::oUI:signal( "buttonSelect" , "clicked()", {|| ::addSources() } )
::oUI:signal( "tabWidget" , "currentChanged(int)", {|o,p| ::updateHbp( p, o ) } )
// TODO: Loading lookup.png inside these buttons...
::oUI:signal( "buttonChoosePrjLoc", "clicked()", {|| ::PromptForPath( 'editPrjLoctn', 'Choose the Project Location...', 'editOutName', "editWrkFolder", "editDstFolder" ) } )
::oUI:signal( "buttonChooseWd" , "clicked()", {|| ::PromptForPath( 'editWrkFolder', 'Choose a Working Folder...' ) } )
::oUI:signal( "buttonChooseDest" , "clicked()", {|| ::PromptForPath( 'editDstFolder', 'Choose a Destination Folder...' ) } )
@@ -367,10 +370,9 @@ METHOD IdeProjManager:fetchProperties()
/*----------------------------------------------------------------------*/
METHOD IdeProjManager:save( lCanClose )
LOCAL a_, a4_1
LOCAL a_, a4_1, lOk
LOCAL typ_:= { "Executable", "Lib", "Dll" }
LOCAL txt_:= {}
LOCAL lOk
* Validate certain parameters before continuing ... (vailtom)
IF Empty( ::oUI:q_editOutName:text() )
@@ -733,7 +735,7 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
::lLaunch := lLaunch
::cProjectInProcess := cProject
IF ::lPPO .AND. ::getCurrentTab() == 0
IF ::lPPO .AND. ::oIde:getCurrentTab() == 0
MsgBox( 'No source available to be compiled' )
RETURN Self
ENDIF
@@ -790,7 +792,7 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
aeval( hbide_filesToSources( ::oProject:sources ), {|e| aadd( aHbp, e ) } )
ELSE
IF !empty( oEdit := ::oED:getEditorCurrent() )
IF !empty( oEdit := ::oEM:getEditorCurrent() )
IF hbide_isSourcePRG( oEdit:sourceFile )
aadd( aHbp, "-hbcmp" )
aadd( aHbp, "-s" )
@@ -816,7 +818,7 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
ENDIF
ENDIF
::lDockBVisible := .t.
::oIde:lDockBVisible := .t.
::oDockB2:show()
::oOutputResult:oWidget:clear()
@@ -854,6 +856,9 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
#else
qStringList := QStringList():new()
IF ::lPPO
qStringList:append( "-hbraw" )
ENDIF
qStringList:append( cHbpPath )
//
::qProcess:setWorkingDirectory( ::oProject:wrkDirectory() )
@@ -862,7 +867,7 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
#endif
ELSE
cOutput := "" ; cErrors := ""
nResult := hb_processRun( ( "hbmk2 " + cHbpPath ), , @cOutput, @cErrors )
nResult := hb_processRun( ( "hbmk2 " + iif( ::lPPO, "-hbraw ", "" ) + cHbpPath ), , @cOutput, @cErrors )
cTmp := cOutput + CRLF
cTmp += IIF( empty( cErrors ), "", cErrors ) + CRLF

View File

@@ -118,7 +118,8 @@ METHOD IdeSourcesManager:loadSources()
/* File nPos nVPos nHPos cTheme lAlert lVisible */
::editSource( a_[ 1 ], a_[ 2 ], a_[ 3 ], a_[ 4 ], a_[ 5 ], .t., .f. )
NEXT
::oED:setSourceVisibleByIndex( val( ::aIni[ INI_HBIDE, RecentTabIndex ] ) )
::oEM:setSourceVisibleByIndex( val( ::aIni[ INI_HBIDE, RecentTabIndex ] ) )
ENDIF
RETURN Self
@@ -128,16 +129,17 @@ METHOD IdeSourcesManager:loadSources()
* Save selected Tab on harddisk and return .T. if successfull!
*/
METHOD IdeSourcesManager:saveSource( nTab, lCancel, lAs )
LOCAL oEdit, lNew, cBuffer, qDocument, nIndex, cSource, cFile, cExt, cNewFile
LOCAL cFileToSave
LOCAL oEdit, lNew, cBuffer, qDocument, nIndex, cSource
LOCAL cFileToSave, cFile, cExt, cNewFile
DEFAULT nTab TO ::getCurrentTab()
DEFAULT nTab TO ::oIde:getCurrentTab()
DEFAULT lAs TO .F.
lCancel := .F.
IF !empty( oEdit := ::oED:getEditorByTabPosition( nTab ) )
IF !empty( oEdit := ::oEM:getEditorByTabPosition( nTab ) )
cSource := oEdit:sourceFile
lNew := Empty( cSource ) .OR. lAs
IF lNew
cNewFile := ::selectSource( 'save', ;
@@ -185,7 +187,7 @@ METHOD IdeSourcesManager:saveSource( nTab, lCancel, lAs )
ENDIF
qDocument:setModified( .f. )
::aSources := { oEdit:sourceFile }
::oIde:aSources := { oEdit:sourceFile }
::createTags()
::updateFuncList()
nIndex := ::qTabWidget:indexOf( oEdit:oTab:oWidget )
@@ -210,14 +212,14 @@ METHOD IdeSourcesManager:editSource( cSourceFile, nPos, nHPos, nVPos, cTheme, lA
MsgBox( 'File not found: ' + cSourceFile )
RETURN Self
ENDIF
IF ::oED:isOpen( cSourceFile )
IF ::oEM:isOpen( cSourceFile )
IF lAlert
IF hbide_getYesNo( cSourceFile + " is already open.", ;
"Want to re-load it again ?", "File Open Info!" )
::oED:reLoad( cSourceFile )
::oEM:reLoad( cSourceFile )
ENDIF
ENDIF
::oED:setSourceVisible( cSourceFile )
::oEM:setSourceVisible( cSourceFile )
RETURN Self
ENDIF
ENDIF
@@ -226,9 +228,9 @@ METHOD IdeSourcesManager:editSource( cSourceFile, nPos, nHPos, nVPos, cTheme, lA
DEFAULT nHPos TO 0
DEFAULT nVPos TO 0
::oED:buildEditor( cSourceFile, nPos, nHPos, nVPos, cTheme )
::oEM:buildEditor( cSourceFile, nPos, nHPos, nVPos, cTheme )
IF lVisible
::oED:setSourceVisible( cSourceFile )
::oEM:setSourceVisible( cSourceFile )
ENDIF
IF !Empty( cSourceFile ) .AND. !hbide_isSourcePPO( cSourceFile )
@@ -242,9 +244,9 @@ METHOD IdeSourcesManager:editSource( cSourceFile, nPos, nHPos, nVPos, cTheme, lA
METHOD IdeSourcesManager:closeSource( nTab, lCanCancel, lCanceled )
LOCAL lSave, n, oEdit
DEFAULT nTab TO ::getCurrentTab()
DEFAULT nTab TO ::oIde:getCurrentTab()
IF !empty( oEdit := ::oED:getEditorByTabPosition( nTab ) )
IF !empty( oEdit := ::oEM:getEditorByTabPosition( nTab ) )
DEFAULT lCanCancel TO .F.
lCanceled := .F.
@@ -352,7 +354,7 @@ METHOD IdeSourcesManager:saveAndExit()
*/
METHOD IdeSourcesManager:revertSource( nTab )
DEFAULT nTab TO ::getCurrentTab()
DEFAULT nTab TO ::oIde:getCurrentTab()
IF nTab < 1
RETURN .F.

View File

@@ -182,8 +182,9 @@ METHOD IdeThemes:create( oIde, cIniFile )
'do','while','exit',;
'for','each','next','step','to',;
'class','endclass','method','data','var','destructor','inline','assign','access',;
'inherit','init','create','virtual',;
'begin','sequence','try','catch','always','recover','hb_symbol_unused' }
'inherit','init','create','virtual','message',;
'begin','sequence','try','catch','always','recover','hb_symbol_unused', ;
'error','handler' }
s := ""; aeval( b_, {|e| s += iif( empty( s ), "", "|" ) + "\b" + upper( e ) + "\b|\b" + e + "\b" } )
aadd( ::aPatterns, { "HarbourKeywords" , s } )

View File

@@ -134,7 +134,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>124</x>
<y>80</y>
<width>191</width>
<width>181</width>
<height>20</height>
</rect>
</property>
@@ -167,7 +167,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>124</x>
<y>112</y>
<width>191</width>
<width>181</width>
<height>20</height>
</rect>
</property>
@@ -200,7 +200,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>124</x>
<y>144</y>
<width>191</width>
<width>181</width>
<height>20</height>
</rect>
</property>
@@ -234,7 +234,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>124</x>
<y>176</y>
<width>191</width>
<width>181</width>
<height>20</height>
</rect>
</property>
@@ -340,14 +340,14 @@ p, li { white-space: pre-wrap; }
<widget class="QPushButton" name="buttonChooseWd">
<property name="geometry">
<rect>
<x>320</x>
<x>316</x>
<y>110</y>
<width>24</width>
<width>29</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>...</string>
<string/>
</property>
<property name="iconSize">
<size>
@@ -359,14 +359,14 @@ p, li { white-space: pre-wrap; }
<widget class="QPushButton" name="buttonChoosePrjLoc">
<property name="geometry">
<rect>
<x>320</x>
<x>316</x>
<y>78</y>
<width>24</width>
<width>29</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>...</string>
<string/>
</property>
<property name="iconSize">
<size>
@@ -381,14 +381,14 @@ p, li { white-space: pre-wrap; }
<widget class="QPushButton" name="buttonChooseDest">
<property name="geometry">
<rect>
<x>320</x>
<x>316</x>
<y>141</y>
<width>24</width>
<width>29</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>...</string>
<string/>
</property>
<property name="iconSize">
<size>