From 8592af5e5badd941c8649473735cb10fe4f6f046 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Tue, 6 Jul 2010 19:52:42 +0000 Subject: [PATCH] 2010-07-06 12:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/ideedit.prg ! .hbs extension treated as .prg for editing operations and syntax highlighting. * contrib/hbide/ideeditor.prg ! .hbs extension treated as a source. * contrib/hbide/ideplugins.prg ! deleted redundant code. * contrib/hbide/ideprojmanager.prg ! Enabled to compile a source and run it without any project definition ( Reported by Antonio Linares ). * contrib/hbide/idesaveload.prg ! Included .hbs as valid text file extension. --- harbour/ChangeLog | 18 ++++++++++++++++++ harbour/contrib/hbide/ideedit.prg | 2 +- harbour/contrib/hbide/ideeditor.prg | 2 +- harbour/contrib/hbide/ideplugins.prg | 4 ++-- harbour/contrib/hbide/ideprojmanager.prg | 24 +++++++++++++++--------- harbour/contrib/hbide/idesaveload.prg | 4 ++-- 6 files changed, 39 insertions(+), 15 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7a43a362ff..39d0e0c022 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,24 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-06 12:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/ideedit.prg + ! .hbs extension treated as .prg for editing operations + and syntax highlighting. + + * contrib/hbide/ideeditor.prg + ! .hbs extension treated as a source. + + * contrib/hbide/ideplugins.prg + ! deleted redundant code. + + * contrib/hbide/ideprojmanager.prg + ! Enabled to compile a source and run it without any project + definition ( Reported by Antonio Linares ). + + * contrib/hbide/idesaveload.prg + ! Included .hbs as valid text file extension. + 2010-07-06 21:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/vm/hvm.c ! Deleted one HB_ULONG cast in HB_SIZE context. diff --git a/harbour/contrib/hbide/ideedit.prg b/harbour/contrib/hbide/ideedit.prg index 4d96da8f37..1d2f8ed724 100644 --- a/harbour/contrib/hbide/ideedit.prg +++ b/harbour/contrib/hbide/ideedit.prg @@ -1990,7 +1990,7 @@ METHOD IdeEdit:handlePreviousWord( lUpdatePrevWord ) nL := len( cWord ) + nSpace nB := qCursor:position() - nL - IF ::oEditor:cExt $ ".prg" .AND. ! ::oINI:lSupressHbKWordsToUpper + IF ::oEditor:cExt $ ".prg,.hbs" .AND. ! ::oINI:lSupressHbKWordsToUpper qCursor:beginEditBlock() qCursor:setPosition( nB ) qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nL ) diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index 196002e645..d59705172e 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -1202,7 +1202,7 @@ METHOD IdeEditor:create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme, cView, a ENDIF ::cType := upper( strtran( ::cExt, ".", "" ) ) - ::cType := iif( ::cType $ "PRG,C,CPP,H,CH,PPO", ::cType, "U" ) + ::cType := iif( ::cType $ "PRG,C,CPP,H,CH,PPO,HBS", ::cType, "U" ) ::buildTabPage( ::sourceFile ) diff --git a/harbour/contrib/hbide/ideplugins.prg b/harbour/contrib/hbide/ideplugins.prg index 56ea938930..c444cdc320 100644 --- a/harbour/contrib/hbide/ideplugins.prg +++ b/harbour/contrib/hbide/ideplugins.prg @@ -164,7 +164,7 @@ FUNCTION hbide_runAScript( cBuffer, cCompFlags, xParam ) LOCAL bError := ErrorBlock( {|o| break( o ) } ) BEGIN SEQUENCE - cFile := hb_compileFromBuf( cBuffer, cCompFlags ) //, "-n2", "-w3", "-es2", "-q0" ) + cFile := hb_compileFromBuf( cBuffer, cCompFlags ) IF ! Empty( cFile ) pHrb := hb_hrbLoad( HB_HRB_BIND_FORCELOCAL, cFile ) ENDIF @@ -177,7 +177,7 @@ FUNCTION hbide_runAScript( cBuffer, cCompFlags, xParam ) BEGIN SEQUENCE hb_hrbDo( pHrb, xParam ) RECOVER USING oErr - MsgBox( "XXX" + oErr:description ) + MsgBox( oErr:description, "Error running script" ) END SEQUENCE ENDIF diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index 44f1cf53d6..f88f482266 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -1536,18 +1536,18 @@ METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess ) * 03/01/2010 - 09:24:50 */ METHOD IdeProjManager:launchProject( cProject, cExe ) - LOCAL cTargetFN, cTmp, oProject + LOCAL cTargetFN, cTmp, oProject, cPath LOCAL qProcess, qStr IF empty( cProject ) cProject := ::oPM:getCurrentProject() ENDIF - IF empty( cProject ) - RETURN Self + + IF !empty( cProject ) + oProject := ::getProjectByTitle( cProject ) ENDIF - oProject := ::getProjectByTitle( cProject ) - IF empty( cExe ) + IF empty( cExe ) .AND. !empty( oProject ) cTargetFN := hbide_pathFile( oProject:destination, iif( empty( oProject:outputName ), "_temp", oProject:outputName ) ) #ifdef __PLATFORM__WINDOWS IF oProject:type == "Executable" @@ -1571,11 +1571,17 @@ METHOD IdeProjManager:launchProject( cProject, cExe ) if .t. qProcess := QProcess():new() - qStr := QStringList():new() - IF !empty( oProject:launchParams ) - qStr:append( oProject:launchParams ) + IF !empty( oProject ) + qStr := QStringList():new() + IF !empty( oProject:launchParams ) + qStr:append( oProject:launchParams ) + ENDIF + qProcess:startDetached( cTargetFN, qStr, hbide_pathToOSPath( oProject:wrkDirectory ) ) + ELSE + hb_fNameSplit( cTargetFN, @cPath ) + qProcess:startDetached( cTargetFN, qStr, hbide_pathToOSPath( cPath ) ) ENDIF - qProcess:startDetached( cTargetFN, qStr, hbide_pathToOSPath( oProject:wrkDirectory ) ) + qProcess:waitForStarted( 3000 ) qProcess := NIL diff --git a/harbour/contrib/hbide/idesaveload.prg b/harbour/contrib/hbide/idesaveload.prg index 54166474cc..e848086b9f 100644 --- a/harbour/contrib/hbide/idesaveload.prg +++ b/harbour/contrib/hbide/idesaveload.prg @@ -126,8 +126,8 @@ CLASS IdeINI INHERIT IdeObject DATA cCurrentHarbour INIT "" DATA cCurrentShortcuts INIT "" // - DATA cTextFileExtensions INIT ".c,.cpp,.prg,.h,.ch,.txt,.log,.ini,.env,.ppo," + ; - ".cc,.hbc,.hbp,.hbm,.xml,.bat,.sh,.rc,.ui,.uic,.bak,.fmg,.qth,.qtp" + DATA cTextFileExtensions INIT ".c,.cpp,.prg,.h,.ch,.txt,.log,.ini,.env,.ppo,.qtp,.hbs," + ; + ".cc,.hbc,.hbp,.hbm,.xml,.bat,.sh,.rc,.ui,.uic,.bak,.fmg,.qth" DATA aProjFiles INIT {} DATA aFiles INIT {} DATA aFind INIT {}