2010-07-04 15:18 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbide/idemisc.prg
    + #include "hbextern.ch"

  * contrib/hbide/ideplugins.prg
  * contrib/hbide/hbide.prg
    + Implemented: execution of auto scripts.
      Any .prg placed in /plugins folder with "auto_" prefix,
         f.e., /harbour/contrib/hbide/plugins/auto_setenv.prg 
      will be executed just after hbIDE dialog is made visible.
      hbIDE itself is passed as only parameter sent to the 
      script. The idea is to allow developers of miscllaneous
      GUI libraries to setup their own environment variables.
      Another aspect of this feature could be changing the 
      behavior of hbIDE itself through its various component
      objects, though it may need some more API functions.
      An idea which can be extended and offers developers 
      greater control over the affairs.

    ! Modified last commit's missing entry.

2010-07-04 14:17 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
  * contrib/hbqt/hbqt_hbqplaintextedit.cpp
    ! Fixed: horizontal selection where background color was 
      missed by a couple of pixels to the left.    

  * contrib/hbide/idefindreplace.prg
    ! Fixed to not "find" twice if "Return" is pressed.

  * contrib/hbide/ideedit.prg
This commit is contained in:
Pritpal Bedi
2010-07-04 22:31:25 +00:00
parent fd0f00b0c9
commit 683038d42e
4 changed files with 61 additions and 9 deletions

View File

@@ -16,6 +16,38 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-07-04 15:18 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/idemisc.prg
+ #include "hbextern.ch"
* contrib/hbide/ideplugins.prg
* contrib/hbide/hbide.prg
+ Implemented: execution of auto scripts.
Any .prg placed in /plugins folder with "auto_" prefix,
f.e., /harbour/contrib/hbide/plugins/auto_setenv.prg
will be executed just after hbIDE dialog is made visible.
hbIDE itself is passed as only parameter sent to the
script. The idea is to allow developers of miscllaneous
GUI libraries to setup their own environment variables.
Another aspect of this feature could be changing the
behavior of hbIDE itself through its various component
objects, though it may need some more API functions.
An idea which can be extended and offers developers
greater control over the affairs.
! Modified last commit's missing entry.
2010-07-04 14:17 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
! Fixed: horizontal selection where background color was
missed by a couple of pixels to the left.
* contrib/hbide/idefindreplace.prg
! Fixed to not "find" twice if "Return" is pressed.
* contrib/hbide/ideedit.prg
2010-07-04 21:25 UTC+0200 Jacek Kubica (kubica@wssk.wroc.pl)
* examples/httpsrv/modules/tableservletdb.prg
! Fixed: mismatch error in two methods declaration

View File

@@ -473,12 +473,6 @@ METHOD HbIde:create( aParams )
/* Fill various elements of the IDE */
::oPM:populate()
::oSM:loadSources()
#if 0
::oDK:setView( ::cWrkView )
IF !empty( ::oIni:aFiles )
::oEM:setSourceVisibleByIndex( max( 0, val( ::oIni:cRecentTabIndex ) )
ENDIF
#endif
::updateTitleBar()
/* Set some last settings */
@@ -549,6 +543,9 @@ METHOD HbIde:create( aParams )
/* Load tags last tagged projects */
::oFN:loadTags( ::oINI:aTaggedProjects )
/* Run Auto Scripts */
hbide_execAutoScripts()
/* Initialize plugins */
hbide_loadPlugins( Self, "1.0" )

View File

@@ -2513,6 +2513,8 @@ FUNCTION hbide_request()
REQUEST XbpTreeView
REQUEST XbpWindow
#include "hbextern.ch" /* Link all Harbour Functions : needed to run auto scripts */
RETURN NIL
/*----------------------------------------------------------------------*/

View File

@@ -158,12 +158,13 @@ STATIC FUNCTION hbide_loadAPlugin( cPlugin, oIde, cVer )
/*----------------------------------------------------------------------*/
FUNCTION hbide_runAScript( cBuffer, cCompFlags )
FUNCTION hbide_runAScript( cBuffer, cCompFlags, xParam )
LOCAL cFile, pHrb, oErr
LOCAL bError := ErrorBlock( {|o| break( o ) } )
LOCAL lError := .f.
HB_SYMBOL_UNUSED( cCompFlags )
HB_SYMBOL_UNUSED( xParam )
BEGIN SEQUENCE
cFile := hb_compileFromBuf( cBuffer, cCompFlags ) //, "-n2", "-w3", "-es2", "-q0" )
@@ -177,9 +178,9 @@ FUNCTION hbide_runAScript( cBuffer, cCompFlags )
IF ! lError .AND. !empty( pHrb )
BEGIN SEQUENCE
hb_hrbDo( pHrb )
hb_hrbDo( pHrb, xParam )
RECOVER USING oErr
MsgBox( oErr:description )
MsgBox( "XXX" + oErr:description )
END SEQUENCE
ENDIF
@@ -188,3 +189,23 @@ FUNCTION hbide_runAScript( cBuffer, cCompFlags )
RETURN NIL
/*----------------------------------------------------------------------*/
FUNCTION hbide_execAutoScripts()
LOCAL cPath, cMask, a_, dir_, cFileName, cBuffer
cPath := hb_dirBase() + hb_osPathSeparator() + "plugins" + hb_osPathSeparator()
cMask := "auto_*.prg"
dir_:= directory( cPath + cMask )
FOR EACH a_ IN dir_
cFileName := a_[ 1 ]
IF !empty( cBuffer := hb_memoRead( cPath + cFileName ) )
HB_TRACE( HB_TR_ALWAYS, cFileName )
hbide_runAScript( cBuffer, /* No Compiler Flag */, hbide_setIde() )
ENDIF
NEXT
RETURN NIL
/*------------------------------------------------------------------------*/