2010-06-27 19:34 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbide/toolsutilities.ui
    + Added "Plugin" "Init at startup" slots.

  * contrib/hbqt/hbqt_hbslots.cpp
    + Deactivated: one tracelog entry.

  * contrib/hbide/hbide.prg
  * contrib/hbide/ideactions.prg
  * contrib/hbide/idedocks.prg
  * contrib/hbide/ideedit.prg
  * contrib/hbide/ideeditor.prg
  * contrib/hbide/idemisc.prg
  * contrib/hbide/ideplugins.prg
  * contrib/hbide/ideprojmanager.prg
  * contrib/hbide/idethemes.prg
  * contrib/hbide/idetools.prg

    % Fixed: docking widgets had stopped to be resizable.

    + Enhanced: plugins are now supported in .prg format also.

    + REQUESTed all hbQT and hbXBP classes for scripts to be 
      completely functional.

    + Added: "Plugins" combo-box and "Init at startup" checkbox in 
      "Tools & Utilities" dialog below to "Command Line Parameters".
      If "Init at startup" checkbox is checked then this plugin 
      is initialized at startup. Such defined plugins can be placed 
      on user-defined toolbars and can be executed directly from 
      there. 

      "Parameters" editbox can hold the parameters passed to the plugin.
      The format of such parameters is like command line but with one 
      difference that string parameter are enclosed in double quotes and 
      separated by spaces. For example: "open" 100 100 700 500.

    + Initialized: plugins at the startup which are flagged as such 
      through  "Tools & Utilities" interface. It facilitate to hook
      user defined parameters, object tweakings, etc at the startup.
      For example, user can setup compiler and or build environment
      with hb_setEnv() functions.
  
    + Top-Toolbar icon "Run as Script". This option allow you to run 
      source of current editing instance as a script. It is especially 
      handy to debug isolated dialogs etc on the fly. Below is an 
      example to test a dialog:

         FUNCTION Main()
            LOCAL oDlg
            LOCAL nT := 10, nL := 10, nW := 300, nH := 200

            oDlg := QDialog():new()
            oDlg:move( nT, nL )
            oDlg:resize( nW, nH )

            oDlg:exec()

            RETURN NIL
     
      NOTE: no preprocessor is available, so all variable must be self contained.

      Preceived, thoughtof, tested, by Antonio Linares, thanks.
This commit is contained in:
Pritpal Bedi
2010-06-28 03:29:19 +00:00
parent 91f79625c2
commit 580ed68ee0
13 changed files with 610 additions and 57 deletions

View File

@@ -16,6 +16,70 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-06-27 19:34 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/toolsutilities.ui
+ Added "Plugin" "Init at startup" slots.
* contrib/hbqt/hbqt_hbslots.cpp
+ Deactivated: one tracelog entry.
* contrib/hbide/hbide.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/ideedit.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/ideplugins.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idethemes.prg
* contrib/hbide/idetools.prg
% Fixed: docking widgets had stopped to be resizable.
+ Enhanced: plugins are now supported in .prg format also.
+ REQUESTed all hbQT and hbXBP classes for scripts to be
completely functional.
+ Added: "Plugins" combo-box and "Init at startup" checkbox in
"Tools & Utilities" dialog below to "Command Line Parameters".
If "Init at startup" checkbox is checked then this plugin
is initialized at startup. Such defined plugins can be placed
on user-defined toolbars and can be executed directly from
there.
"Parameters" editbox can hold the parameters passed to the plugin.
The format of such parameters is like command line but with one
difference that string parameter are enclosed in double quotes and
separated by spaces. For example: "open" 100 100 700 500.
+ Initialized: plugins at the startup which are flagged as such
through "Tools & Utilities" interface. It facilitate to hook
user defined parameters, object tweakings, etc at the startup.
For example, user can setup compiler and or build environment
with hb_setEnv() functions.
+ Top-Toolbar icon "Run as Script". This option allow you to run
source of current editing instance as a script. It is especially
handy to debug isolated dialogs etc on the fly. Below is an
example to test a dialog:
FUNCTION Main()
LOCAL oDlg
LOCAL nT := 10, nL := 10, nW := 300, nH := 200
oDlg := QDialog():new()
oDlg:move( nT, nL )
oDlg:resize( nW, nH )
oDlg:exec()
RETURN NIL
NOTE: no preprocessor is available, so all variable must be self contained.
Preceived, thoughtof, tested, by Antonio Linares, thanks.
2010-06-28 02:29 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/qtwebkit/hbqtwebkit.hbp
+ contrib/hbqt/qtwebkit/hbqtwebkits.hbp

View File

@@ -93,6 +93,8 @@ STATIC s_pathSep
PROCEDURE Main( ... )
LOCAL oIde
hbide_request()
#ifdef HB_IDE_DISTRO
LOCAL cSep := hb_osPathSeparator()
LOCAL cBse := hb_dirBase() + ".."
@@ -536,9 +538,8 @@ METHOD HbIde:create( aParams )
/* Load tags last tagged projects */
::oFN:loadTags( ::oINI:aTaggedProjects )
#if 0 /* Can be controlled through setup */
/* Initialize plugins */
hbide_loadPlugins( Self, "1.0" )
#endif
DO WHILE .t.
::nEvent := AppEvent( @::mp1, @::mp2, @::oXbp )
@@ -702,6 +703,7 @@ METHOD HbIde:execAction( cKey )
CASE "NewProject"
CASE "LoadProject"
CASE "LaunchProject"
CASE "RunAsScript"
CASE "BuildSource"
CASE "Build"
CASE "BuildLaunch"
@@ -959,6 +961,9 @@ METHOD HbIde:execProjectAction( cKey )
CASE "LaunchProject"
::oPM:launchProject()
EXIT
CASE "RunAsScript"
::oPM:runAsScript( .t. )
EXIT
CASE "BuildSource"
::oPM:buildSource( .t. )
EXIT

View File

@@ -182,6 +182,7 @@ METHOD IdeActions:loadActions()
aadd( aAct, { "TB_Save" , "~Save" , "save" , "" , "No", "Yes" } )
aadd( aAct, { "TB_Close" , "~Close" , "close" , "" , "No", "Yes" } )
aadd( aAct, { "TB_Print" , "~Print" , "print" , "" , "No", "Yes" } )
aadd( aAct, { "TB_Script" , "Run as script" , "runscript" , "" , "No", "Yes" } )
aadd( aAct, { "TB_Compile" , "Co~mpile" , "compile" , "" , "No", "Yes" } )
aadd( aAct, { "TB_CompilePPO" , "Com~pile to PPO" , "ppo" , "" , "No", "Yes" } )
aadd( aAct, { "TB_BuildSource" , "Build Source" , "buildsource" , "" , "No", "Yes" } )
@@ -341,6 +342,7 @@ METHOD IdeActions:buildToolBar()
oTBar:addItem( ::getAction( "TB_Close" ), , , , , , "Close" )
oTBar:addItem( ::getAction( "TB_Print" ), , , , , , "Print" )
oTBar:addItem( , , , , , nSep )
oTBar:addItem( ::getAction( "TB_Script" ), , , , , , "RunAsScript" )
oTBar:addItem( ::getAction( "TB_Compile" ), , , , , , "Compile" )
oTBar:addItem( ::getAction( "TB_CompilePPO" ), , , , , , "CompilePPO" )
oTBar:addItem( ::getAction( "TB_BuildSource" ), , , , , , "BuildSource" )

View File

@@ -232,7 +232,7 @@ METHOD IdeDocks:buildDialog()
::oDlg:icon := hbide_image( "hbide" )
::oDlg:title := "Harbour IDE"
// ::oDlg:qtObject := HbQtUI():new( hbide_uic( "mainwindow" ) ):build()
::oUI := hbide_getUI( "mainwindow" )
::oDlg:qtObject := hbide_getUI( "mainwindow" )
::oDlg:create( , , , , , .f. )
::oDlg:setStyleSheet( GetStyleSheet( "QMainWindow", ::nAnimantionMode ) )

View File

@@ -2313,6 +2313,7 @@ FUNCTION hbide_isHarbourKeyword( cWord, oIde )
STATIC s_b_ := { ;
'function' => NIL,;
'return' => NIL,;
'request' => NIL,;
'static' => NIL,;
'local' => NIL,;
'default' => NIL,;

View File

@@ -1644,6 +1644,12 @@ METHOD IdeEditor:scrollThumbnail()
/*----------------------------------------------------------------------*/
METHOD IdeEditor:qscintilla()
// hbide_browseSome( Self )
// hbide_qtDesigner()
#ifdef HB_WITH_QSCINTILLA
#include "hbqscintilla.ch"
@@ -1712,10 +1718,11 @@ METHOD IdeEditor:qscintilla()
oSci:setAutoCompletionShowSingle( .t. )
oSci:setAutoCompletionFillupsEnabled( .t. )
HB_TRACE( HB_TR_ALWAYS, time() )
HB_TRACE( HB_TR_ALWAYS, time() )
oSci:setText( hb_memoread( "c:\harbour\contrib\hbide\idemisc.prg" ) )
// oSci:setText( hb_memoread( "c:\harbour\contrib\hbide\ideparseexpr.c" ) )
HB_TRACE( HB_TR_ALWAYS, time(), "after" )
HB_TRACE( HB_TR_ALWAYS, time(), "after" )
c1 := QColor():new( 0,0,255 )
c2 := QColor():new( 0,12,133 )
c3 := QColor():new( 20,122,144 )
@@ -1749,8 +1756,8 @@ HB_TRACE( HB_TR_ALWAYS, time(), "after" )
qLexer:setColor( QColor():new( 255, 127, 67 ), SCE_FS_KEYWORD )
qLexer:setColor( QColor():new( 255, 0, 127 ), SCE_FS_KEYWORD2 )
qLexer:setColor( QColor():new( 127, 67 , 255 ), SCE_FS_OPERATOR )
qLexer:setColor( QColor():new( 255, 0 , 0 ), SCE_FS_BRACE )
qLexer:setColor( QColor():new( 127, 67, 255 ), SCE_FS_OPERATOR )
qLexer:setColor( QColor():new( 255, 0, 0 ), SCE_FS_BRACE )
qApis := QsciAPIs():new( qLexer )
qApis:load( "c:/temp/cpp.api" )
@@ -1767,4 +1774,38 @@ HB_TRACE( HB_TR_ALWAYS, time(), "after" )
/*----------------------------------------------------------------------*/
STATIC FUNCTION hbide_qtDesigner()
#ifdef __DESIGNER__
LOCAL n
STATIC oEdt, oWM
oEdt := QDesignerFormEditorInterface():new( ::oDlg:oWidget )
HB_TRACE( HB_TR_ALWAYS, 1 )
oWM := QDesignerFormWindowManagerInterface():from( oEdt:formWindowManager() )
HB_TRACE( HB_TR_ALWAYS, 2 )
oWM:createFormWindow( ::oQScintillaDock:oWidget )
HB_TRACE( HB_TR_ALWAYS, 3 )
::oQScintillaDock:oWidget:show()
HB_TRACE( HB_TR_ALWAYS, 4 )
n := oWM:formWindowCount()
HB_TRACE( HB_TR_ALWAYS, n )
/*
QDesignerActionEditorInterface * actionEditor () const
QDesignerFormWindowManagerInterface * formWindowManager () const
QDesignerObjectInspectorInterface * objectInspector () const
QDesignerPropertyEditorInterface * propertyEditor () const
void setActionEditor ( QDesignerActionEditorInterface * actionEditor )
void setObjectInspector ( QDesignerObjectInspectorInterface * objectInspector )
void setPropertyEditor ( QDesignerPropertyEditorInterface * propertyEditor )
void setWidgetBox ( QDesignerWidgetBoxInterface * widgetBox )
QWidget * topLevel () const
QDesignerWidgetBoxInterface * widgetBox () const
*/
#endif
RETURN NIL
/*----------------------------------------------------------------------*/

View File

@@ -2068,7 +2068,7 @@ FUNCTION hbide_parseToolComponents( cCompositeTool )
LOCAL a_
a_:= hb_atokens( cCompositeTool, "," )
asize( a_, 10 )
asize( a_, 12 )
DEFAULT a_[ 1 ] TO ""
DEFAULT a_[ 2 ] TO ""
DEFAULT a_[ 3 ] TO ""
@@ -2079,6 +2079,8 @@ FUNCTION hbide_parseToolComponents( cCompositeTool )
DEFAULT a_[ 8 ] TO "YES"
DEFAULT a_[ 9 ] TO ""
DEFAULT a_[10 ] TO ""
DEFAULT a_[11 ] TO ""
DEFAULT a_[12 ] TO ""
a_[ 1 ] := alltrim( a_[ 1 ] )
a_[ 2 ] := alltrim( a_[ 2 ] )
a_[ 3 ] := alltrim( a_[ 3 ] )
@@ -2089,6 +2091,8 @@ FUNCTION hbide_parseToolComponents( cCompositeTool )
a_[ 8 ] := alltrim( a_[ 8 ] )
a_[ 9 ] := alltrim( a_[ 9 ] )
a_[10 ] := alltrim( a_[10 ] )
a_[11 ] := alltrim( a_[11 ] )
a_[12 ] := alltrim( a_[12 ] )
RETURN a_
@@ -2184,9 +2188,8 @@ FUNCTION hbide_getUI( cUI, qParent )
oUI := iif( nModeUI == UI_MODE_FUNC, uiMainwindow( qParent ), NIL )
EXIT
ENDSWITCH
HB_TRACE( HB_TR_ALWAYS, nModeUI, 0 )
IF empty( oUI )
HB_TRACE( HB_TR_ALWAYS, nModeUI, 1 )
IF nModeUI == UI_MODE_UI
oUI := HbQtUI():new( hbide_ui( cUI ), qParent ):create()
ELSE
@@ -2198,3 +2201,316 @@ HB_TRACE( HB_TR_ALWAYS, nModeUI, 1 )
/*----------------------------------------------------------------------*/
FUNCTION hbide_request()
REQUEST HBDbfModel
REQUEST HBEvents
REQUEST HBQMainWindow
REQUEST HBQPlainTextEdit
REQUEST HBQSyntaxHighlighter
REQUEST HBQTableView
REQUEST HBQTextBlockUserData
REQUEST HBSlots
REQUEST QAbstractButton
REQUEST QAbstractItemDelegate
REQUEST QAbstractItemModel
REQUEST QAbstractItemView
REQUEST QAbstractListModel
REQUEST QAbstractProxyModel
REQUEST QAbstractPrintDialog
REQUEST QAbstractScrollArea
REQUEST QAbstractSlider
REQUEST QAbstractSpinBox
REQUEST QAbstractTableModel
REQUEST QAbstractTextDocumentLayout
REQUEST QAction
REQUEST QActionGroup
REQUEST QApplication
REQUEST QBitArray
REQUEST QBitmap
REQUEST QBoxLayout
REQUEST QBrush
REQUEST QBuffer
REQUEST QButtonGroup
REQUEST QByteArray
REQUEST QCalendarWidget
REQUEST QChar
REQUEST QCheckBox
REQUEST QClipboard
REQUEST QColor
REQUEST QColorDialog
REQUEST QComboBox
REQUEST QCommandLinkButton
REQUEST QCommonStyle
REQUEST QCompleter
REQUEST QConicalGradient
REQUEST QContextMenuEvent
REQUEST QCoreApplication
REQUEST QCursor
REQUEST QDataStream
REQUEST QDate
REQUEST QDateEdit
REQUEST QDateTime
REQUEST QDateTimeEdit
REQUEST QDesktopWidget
REQUEST QDial
REQUEST QDialog
REQUEST QDir
REQUEST QDirModel
REQUEST QDockWidget
REQUEST QDoubleSpinBox
REQUEST QDropEvent
REQUEST QDragMoveEvent
REQUEST QDragEnterEvent
REQUEST QDragLeaveEvent
REQUEST QErrorMessage
REQUEST QEvent
REQUEST QEventLoop
REQUEST QFile
REQUEST QFileDialog
REQUEST QFileInfo
REQUEST QFileIconProvider
REQUEST QFileSystemModel
REQUEST QFocusEvent
REQUEST QFocusFrame
REQUEST QFont
REQUEST QFontComboBox
REQUEST QFontDatabase
REQUEST QFontDialog
REQUEST QFontInfo
REQUEST QFontMetrics
REQUEST QFontMetricsF
REQUEST QFormLayout
REQUEST QFrame
REQUEST QFtp
REQUEST QGradient
REQUEST QGridLayout
REQUEST QGroupBox
REQUEST QHBoxLayout
REQUEST QHeaderView
REQUEST QHelpEvent
REQUEST QHideEvent
REQUEST QHttp
REQUEST QHttpHeader
REQUEST QHttpRequestHeader
REQUEST QHttpResponseHeader
REQUEST QIcon
REQUEST QInputMethodEvent
REQUEST QImage
REQUEST QImageReader
REQUEST QImageWriter
REQUEST QInputDialog
REQUEST QInputEvent
REQUEST QIODevice
REQUEST QItemDelegate
REQUEST QItemEditorCreatorBase
REQUEST QItemEditorFactory
REQUEST QItemSelection
REQUEST QItemSelectionModel
REQUEST QKeyEvent
REQUEST QKeySequence
REQUEST QLabel
REQUEST QLatin1Char
REQUEST QLatin1String
REQUEST QLayout
REQUEST QLayoutItem
REQUEST QLCDNumber
REQUEST QLine
REQUEST QLineF
REQUEST QLinearGradient
REQUEST QLineEdit
REQUEST QList
REQUEST QListView
REQUEST QListWidget
REQUEST QListWidgetItem
REQUEST QLocale
REQUEST QMainWindow
REQUEST QMatrix
REQUEST QMdiArea
REQUEST QMdiSubWindow
REQUEST QMenu
REQUEST QMenuBar
REQUEST QMessageBox
REQUEST QMimeData
REQUEST QModelIndex
REQUEST QMouseEvent
REQUEST QMoveEvent
REQUEST QMovie
REQUEST QNetworkRequest
REQUEST QObject
REQUEST QPageSetupDialog
REQUEST QPaintDevice
REQUEST QPaintEngine
REQUEST QPainter
REQUEST QPainterPath
REQUEST QPaintEvent
REQUEST QPalette
REQUEST QPen
REQUEST QPicture
REQUEST QPixmap
REQUEST QPlainTextDocumentLayout
REQUEST QPlainTextEdit
REQUEST QPoint
REQUEST QPointF
REQUEST QPolygon
REQUEST QPolygonF
REQUEST QPrintDialog
REQUEST QPrintEngine
REQUEST QPrinter
REQUEST QPrintPreviewDialog
REQUEST QProcess
REQUEST QProgressBar
REQUEST QProgressDialog
REQUEST QPushButton
REQUEST QRadialGradient
REQUEST QRadioButton
REQUEST QRect
REQUEST QRectF
REQUEST QRegion
REQUEST QRegExp
REQUEST QResizeEvent
REQUEST QResource
REQUEST QScrollArea
REQUEST QScrollBar
REQUEST QSessionManager
REQUEST QSettings
REQUEST QShowEvent
REQUEST QSignalMapper
REQUEST QSize
REQUEST QSizeF
REQUEST QSizeGrip
REQUEST QSizePolicy
REQUEST QSlider
REQUEST QSound
REQUEST QSpacerItem
REQUEST QSpinBox
REQUEST QSplashScreen
REQUEST QSplitter
REQUEST QStackedWidget
REQUEST QStandardItem
REQUEST QStandardItemModel
REQUEST QStatusBar
REQUEST QStringList
REQUEST QStringListModel
REQUEST QStyle
REQUEST QStyledItemDelegate
REQUEST QStyleFactory
REQUEST QStyleHintReturn
REQUEST QStyleHintReturnMask
REQUEST QStyleHintReturnVariant
REQUEST QStyleOption
REQUEST QStyleOptionButton
REQUEST QStyleOptionComboBox
REQUEST QStyleOptionComplex
REQUEST QStyleOptionDockWidget
REQUEST QStyleOptionFocusRect
REQUEST QStyleOptionFrame
REQUEST QStyleOptionGroupBox
REQUEST QStyleOptionHeader
REQUEST QStyleOptionMenuItem
REQUEST QStyleOptionProgressBar
REQUEST QStyleOptionSizeGrip
REQUEST QStyleOptionSlider
REQUEST QStyleOptionSpinBox
REQUEST QStyleOptionTab
REQUEST QStyleOptionTabBarBase
REQUEST QStyleOptionTabWidgetFrame
REQUEST QStyleOptionTitleBar
REQUEST QStyleOptionToolBar
REQUEST QStyleOptionToolBox
REQUEST QStyleOptionToolButton
REQUEST QStyleOptionViewItem
REQUEST QStylePainter
REQUEST QSyntaxHighlighter
REQUEST QSystemTrayIcon
REQUEST QTabBar
REQUEST QTableView
REQUEST QTableWidget
REQUEST QTableWidgetItem
REQUEST QTabWidget
REQUEST QTableWidgetSelectionRange
REQUEST QTextBlock
REQUEST QTextBlockFormat
REQUEST QTextBlockGroup
REQUEST QTextBrowser
REQUEST QTextBoundaryFinder
REQUEST QTextCharFormat
REQUEST QTextCodec
REQUEST QTextCursor
REQUEST QTextDecoder
REQUEST QTextDocument
REQUEST QTextDocumentFragment
REQUEST QTextDocumentWriter
REQUEST QTextEdit
REQUEST QTextEncoder
REQUEST QTextFormat
REQUEST QTextFragment
REQUEST QTextFrame
REQUEST QTextFrameFormat
REQUEST QTextImageFormat
REQUEST QTextInlineObject
REQUEST QTextItem
REQUEST QTextLayout
REQUEST QTextLength
REQUEST QTextLine
REQUEST QTextList
REQUEST QTextListFormat
REQUEST QTextObject
REQUEST QTextOption
REQUEST QTextStream
REQUEST QTextTableFormat
REQUEST QThread
REQUEST QTime
REQUEST QTimeEdit
REQUEST QTimer
REQUEST QToolBar
REQUEST QToolBox
REQUEST QToolButton
REQUEST QTransform
REQUEST QTranslator
REQUEST QTreeView
REQUEST QTreeWidget
REQUEST QTreeWidgetItem
REQUEST QUiLoader
REQUEST QUrl
REQUEST QValidator
REQUEST QVariant
REQUEST QVBoxLayout
REQUEST QWheelEvent
REQUEST QWidget
REQUEST QWidgetAction
REQUEST QWidgetItem
REQUEST QWindowsStyle
REQUEST QWindowStateChangeEvent
REQUEST QWizard
REQUEST QWizardPage
REQUEST Xbp3State
REQUEST XbpBitmap
REQUEST XbpBrowse
REQUEST XbpCheckBox
REQUEST XbpClipBoard
REQUEST XbpComboBox
REQUEST XbpDataRef
REQUEST XbpDialog
REQUEST XbpFileDialog
REQUEST XbpFontDialog
REQUEST XbpHtmlViewer
REQUEST XbpListBox
REQUEST XbpMenuBar
REQUEST XbpMLE
REQUEST XbpPresSpace
REQUEST XbpPrintDialog
REQUEST XbpPrinter
REQUEST XbpPushButton
REQUEST XbpRadioButton
REQUEST XbpRtf
REQUEST XbpScrollBar
REQUEST XbpTabPage
REQUEST XbpToolBar
REQUEST XbpTreeView
REQUEST XbpWindow
RETURN NIL
/*----------------------------------------------------------------------*/

View File

@@ -78,28 +78,17 @@ STATIC s_aLoaded := { { "", .f. } }
/*----------------------------------------------------------------------*/
FUNCTION hbide_loadPlugins( oIde, cVer )
LOCAL cPath := hb_dirBase() + hb_osPathSeparator() + "plugins" + hb_osPathSeparator()
LOCAL dir_, a_, cFile, pHrb, bBlock
LOCAL a_, cPlugin
dir_:= directory( cPath + "*.hrb" )
FOR EACH a_ IN oIde:oINI:aTools
IF a_[ 12 ] == "YES"
hb_fNameSplit( a_[ 11 ], , @cPlugin )
FOR EACH a_ IN dir_
hb_fNameSplit( a_[ 1 ], , @cFile )
pHrb := hb_hrbLoad( HB_HRB_BIND_OVERLOAD, cPath + cFile )
IF ! Empty( pHrb ) .AND. ! Empty( hb_hrbGetFunSym( pHrb, cFile + "_init" ) )
bBlock := &( "{|...| " + cFile + "_init(...) }" )
IF eval( bBlock, oIde, cVer )
IF ! Empty( hb_hrbGetFunSym( pHrb, cFile + "_exec" ) )
aadd( s_aPlugins, { lower( cFile ), &( "{|...| " + cFile + "_exec(...) }" ), pHrb } )
ENDIF
ENDIF
RETURN hbide_loadAPlugin( cPlugin, oIde, cVer )
ENDIF
NEXT
RETURN bBlock
RETURN .f.
/*----------------------------------------------------------------------*/
@@ -124,18 +113,27 @@ FUNCTION hbide_execPlugin( cPlugin, oIde, ... )
/*----------------------------------------------------------------------*/
STATIC FUNCTION hbide_loadAPlugin( cPlugin, oIde, cVer )
LOCAL cPath, pHrb, bBlock, lLoaded
LOCAL pHrb, bBlock, lLoaded, cFileName, cFile
cPath := hb_dirBase() + hb_osPathSeparator() + "plugins" + hb_osPathSeparator() + cPlugin + ".hrb"
cFileName := hb_dirBase() + hb_osPathSeparator() + "plugins" + hb_osPathSeparator() + cPlugin + ".hrb"
IF hb_fileExists( cFileName )
pHrb := hb_hrbLoad( HB_HRB_BIND_OVERLOAD, cFileName )
ELSE
cFileName := hb_dirBase() + hb_osPathSeparator() + "plugins" + hb_osPathSeparator() + cPlugin + ".prg"
IF hb_fileExists( cFileName )
cFile := hb_memoread( cFileName )
cFile := hb_compileFromBuf( cFile, "-n2", "-w3", "-es2", "-q0" )
IF ! Empty( cFile )
pHrb := hb_hrbLoad( HB_HRB_BIND_OVERLOAD, cFile )
ENDIF
ENDIF
ENDIF
IF ( lLoaded := hb_fileExists( cPath ) )
pHrb := hb_hrbLoad( HB_HRB_BIND_OVERLOAD, cPath )
IF ! Empty( pHrb ) .AND. ! Empty( hb_hrbGetFunSym( pHrb, cPlugin + "_init" ) )
IF ( lLoaded := ! empty( pHrb ) )
IF ! Empty( hb_hrbGetFunSym( pHrb, cPlugin + "_init" ) )
bBlock := &( "{|...| " + cPlugin + "_init(...) }" )
IF eval( bBlock, oIde, cVer )
IF ! Empty( hb_hrbGetFunSym( pHrb, cPlugin + "_exec" ) )
aadd( s_aPlugins, { cPlugin, &( "{|...| " + cPlugin + "_exec(...) }" ), pHrb } )
lLoaded := .t.
@@ -151,3 +149,33 @@ STATIC FUNCTION hbide_loadAPlugin( cPlugin, oIde, cVer )
/*----------------------------------------------------------------------*/
FUNCTION hbide_runAScript( cBuffer, cCompFlags )
LOCAL cFile, pHrb, oErr
LOCAL bError := ErrorBlock( {|o| break( o ) } )
LOCAL lError := .f.
HB_SYMBOL_UNUSED( cCompFlags )
BEGIN SEQUENCE
cFile := hb_compileFromBuf( cBuffer, cCompFlags ) //, "-n2", "-w3", "-es2", "-q0" )
IF ! Empty( cFile )
pHrb := hb_hrbLoad( HB_HRB_BIND_FORCELOCAL, cFile )
ENDIF
RECOVER USING oErr
MsgBox( oErr:description )
lError := .t.
END SEQUENCE
IF ! lError .AND. !empty( pHrb )
BEGIN SEQUENCE
hb_hrbDo( pHrb )
RECOVER USING oErr
MsgBox( oErr:description )
END SEQUENCE
ENDIF
ErrorBlock( bError )
RETURN NIL
/*----------------------------------------------------------------------*/

View File

@@ -269,6 +269,7 @@ CLASS IdeProjManager INHERIT IdeObject
METHOD pullHbpData( cHbp )
METHOD synchronizeAlienProject( cProjFileName )
METHOD outputText( cText )
METHOD runAsScript()
ENDCLASS
@@ -1571,6 +1572,17 @@ METHOD IdeProjManager:launchProject( cProject, cExe )
/*----------------------------------------------------------------------*/
METHOD IdeProjManager:runAsScript()
LOCAL oEdit
IF !empty( oEdit := ::oEM:getEditorCurrent() )
hbide_runAScript( oEdit:qEdit:toPlainText() )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeProjManager:outputText( cText )
::oOutputResult:oWidget:append( cText )

View File

@@ -186,7 +186,7 @@ METHOD IdeThemes:create( oIde, cIniFile )
/* These are the supported patterns - rest will be ignore until implemented */
/* Compiler Directives */
b_:= { "include","define","ifndef","ifdef","else","endif","command","xcommand","translate","xtranslate" }
b_:= { "include","define","if","ifndef","ifdef","else","endif","command","xcommand","translate","xtranslate" }
s := ""; aeval( b_, {|e| s += iif( empty( s ), "", "|" ) + "#" + e + "\b" } )
aadd( ::aPatterns, { "PreprocessorDirectives", s, .f. } )
@@ -197,7 +197,7 @@ METHOD IdeThemes:create( oIde, cIniFile )
'switch','endswitch', ;
'do','while','exit','enddo','loop',;
'for','each','next','step','to','in',;
'with','object','endwith',;
'with','object','endwith','request',;
'nil','and','or','self',;
'class','endclass','method','data','var','destructor','inline','assign','access',;
'inherit','init','create','virtual','message', 'from', 'setget',;

View File

@@ -84,6 +84,7 @@ CLASS IdeToolsManager INHERIT IdeObject
DATA aHdr INIT {}
DATA aBtns INIT {}
DATA aToolbars INIT { NIL,NIL,NIL,NIL,NIL }
DATA aPlugins INIT {}
ACCESS aTools INLINE ::oINI:aTools
ACCESS aUserToolBars INLINE ::oINI:aUserToolbars
@@ -109,6 +110,7 @@ CLASS IdeToolsManager INHERIT IdeObject
METHOD ini2toolbarControls( nIndex, nMode )
METHOD populateButtonsTable( nIndex )
METHOD buildUserToolbars()
METHOD populatePlugins( lClear )
ENDCLASS
@@ -274,6 +276,7 @@ METHOD IdeToolsManager:show()
::oUI:q_listToolbars:setCurrentRow( 0 )
ENDIF
::populatePlugins( .t. )
::clearList()
::populateList( ::oINI:aTools )
::oUI:q_listNames:setCurrentRow( 0 )
@@ -534,6 +537,8 @@ METHOD IdeToolsManager:ini2controls( nIndex )
::oUI:q_buttonSetImage :setIcon( iif( empty( ::aTools[ nIndex, 9 ] ), hbide_image( "open" ), ;
hbide_pathToOsPath( ::aTools[ nIndex, 9 ] ) ) )
::oUI:q_editTooltip :setText( ::aTools[ nIndex, 10 ] )
::oUI:q_comboPlugin :setCurrentIndex( ascan( ::aPlugins, {|e| ::aTools[ nIndex, 11 ] == e } ) - 1 )
::oUI:q_checkPlugInit :setChecked( ::aTools[ nIndex, 12 ] == "YES" )
ELSE
::oUI:q_editName :setText( "" )
@@ -548,6 +553,8 @@ METHOD IdeToolsManager:ini2controls( nIndex )
::oUI:q_editImage :setText( "" )
::oUI:q_buttonSetImage :setIcon( hbide_image( "open" ) )
::oUI:q_editTooltip :setText( "" )
::oUI:q_comboPlugin :setCurrentIndex( -1 )
::oUI:q_checkPlugInit :setChecked( .f. )
ENDIF
@@ -566,14 +573,16 @@ METHOD IdeToolsManager:controls2ini( nIndex )
hbide_pathNormalized( ::oUI:q_editCmdLine:text() ), ;
hbide_pathNormalized( ::oUI:q_editParams:text() ), ;
hbide_pathNormalized( ::oUI:q_editStayIn:text() ), ;
iif( ::oUI:q_checkCapture:isChecked(), "YES", "" ), ;
iif( ::oUI:q_checkCapture :isChecked(), "YES", "" ), ;
iif( ::oUI:q_checkOpenCons:isChecked(), "YES", "" ), ;
;
hb_ntos( ::oUI:q_comboToolbarAsgnd:currentIndex() ), ;
iif( ::oUI:q_checkToolActive:isChecked(), "YES", "NO" ), ;
::oUI:q_editImage:text(), ;
::oUI:q_editTooltip:text() ;
}
::oUI:q_editTooltip:text(), ;
::oUI:q_comboPlugin:currentText(), ;
iif( ::oUI:q_checkPlugInit:isChecked(), "YES", "NO" ) ;
}
RETURN Self
/*----------------------------------------------------------------------*/
@@ -599,6 +608,28 @@ METHOD IdeToolsManager:populateList( aList )
/*----------------------------------------------------------------------*/
METHOD IdeToolsManager:populatePlugins( lClear )
LOCAL cDir, aDir, aFile
IF lClear
::oUI:q_comboPlugin:clear()
ENDIF
::aPlugins := {}
cDir := hb_dirBase() + "plugins" + hb_osPathSeparator()
aDir := directory( cDir + "*" )
IF !empty( aDir )
FOR EACH aFile IN aDir
::oUI:q_comboPlugin:addItem( aFile[ 1 ] )
aadd( ::aPlugins, aFile[ 1 ] )
NEXT
::oUI:q_comboPlugin:setCurrentIndex( -1 )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeToolsManager:buildToolsButton()
LOCAL a_, qAct
@@ -688,18 +719,23 @@ METHOD IdeToolsManager:execToolByParams( cCmd, cParams, cStartIn, lCapture, lOpe
/*----------------------------------------------------------------------*/
METHOD IdeToolsManager:execTool( ... )
LOCAL nIndex, cCmd, cParams, cStayIn, lCapture, lOpen, aParam
LOCAL nIndex, cCmd, cParams, cStayIn, lCapture, lOpen, aParam, cPlugin, a_
aParam := hb_aParams()
IF len( aParam ) == 1
IF ( nIndex := ascan( ::aTools, {|e_| e_[ 1 ] == aParam[ 1 ] } ) ) > 0
hb_fNameSplit( ::aTools[ nIndex, 11 ], , @cPlugin )
cCmd := hbide_pathToOSPath( ::aTools[ nIndex, 2 ] )
cParams := ::aTools[ nIndex, 3 ]
cParams := iif( "http://" $ lower( cParams ), cParams, hbide_pathToOSPath( cParams ) )
cParams := iif( "http://" $ lower( cParams ) .OR. !empty( cPlugin ), cParams, hbide_pathToOSPath( cParams ) )
cParams := ::parseParams( cParams )
cStayIn := hbide_pathToOSPath( ::aTools[ nIndex, 4 ] )
lCapture := ::aTools[ nIndex, 5 ] == "YES"
lOpen := ::aTools[ nIndex, 6 ] == "YES"
ENDIF
ELSEIF len( aParam ) > 1
asize( aParam, 5 )
@@ -716,10 +752,21 @@ METHOD IdeToolsManager:execTool( ... )
cStayIn := hbide_pathToOSPath( aParam[ 3 ] )
lCapture := iif( hb_isLogical( aParam[ 4 ] ), aParam[ 4 ], aParam[ 4 ] == "YES" )
lOpen := iif( hb_isLogical( aParam[ 5 ] ), aParam[ 5 ], aParam[ 5 ] == "YES" )
ENDIF
IF hb_isLogical( lCapture )
::execToolByParams( cCmd, cParams, cStayIn, lCapture, lOpen )
IF !empty( cPlugin )
a_:= hb_aTokens( cParams, " " )
FOR EACH cParams IN a_
cParams := hbide_evalAsis( cParams )
NEXT
hbide_execPlugin( cPlugin, ::oIde, hb_arrayToParams( a_ ) )
ELSE
::execToolByParams( cCmd, cParams, cStayIn, lCapture, lOpen )
ENDIF
ENDIF
RETURN Self
@@ -809,3 +856,4 @@ METHOD IdeToolsManager:macro2value( cMacro )
RETURN cVal
/*----------------------------------------------------------------------*/

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>602</width>
<height>425</height>
<height>478</height>
</rect>
</property>
<property name="windowTitle">
@@ -74,7 +74,7 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>12</x>
<y>392</y>
<y>448</y>
<width>149</width>
<height>24</height>
</rect>
@@ -87,7 +87,7 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>12</x>
<y>278</y>
<y>334</y>
<width>79</width>
<height>16</height>
</rect>
@@ -149,7 +149,7 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>12</x>
<y>376</y>
<y>432</y>
<width>253</width>
<height>16</height>
</rect>
@@ -175,7 +175,7 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>12</x>
<y>296</y>
<y>352</y>
<width>253</width>
<height>20</height>
</rect>
@@ -209,7 +209,7 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>172</x>
<y>392</y>
<y>448</y>
<width>95</width>
<height>24</height>
</rect>
@@ -245,7 +245,7 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>14</x>
<y>320</y>
<y>376</y>
<width>95</width>
<height>16</height>
</rect>
@@ -257,9 +257,9 @@ p, li { white-space: pre-wrap; }
<widget class="QLineEdit" name="editStayIn">
<property name="geometry">
<rect>
<x>14</x>
<y>338</y>
<width>251</width>
<x>12</x>
<y>394</y>
<width>253</width>
<height>20</height>
</rect>
</property>
@@ -277,7 +277,7 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>14</x>
<y>362</y>
<y>418</y>
<width>109</width>
<height>19</height>
</rect>
@@ -300,7 +300,7 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>134</x>
<y>362</y>
<y>418</y>
<width>131</width>
<height>19</height>
</rect>
@@ -476,7 +476,7 @@ p, li { white-space: pre-wrap; }
<x>284</x>
<y>284</y>
<width>307</width>
<height>131</height>
<height>187</height>
</rect>
</property>
<property name="title">
@@ -488,7 +488,7 @@ p, li { white-space: pre-wrap; }
<x>10</x>
<y>16</y>
<width>253</width>
<height>107</height>
<height>161</height>
</rect>
</property>
</widget>
@@ -614,6 +614,42 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_4">
<property name="geometry">
<rect>
<x>10</x>
<y>280</y>
<width>257</width>
<height>47</height>
</rect>
</property>
<property name="title">
<string> Plugin </string>
</property>
<widget class="QComboBox" name="comboPlugin">
<property name="geometry">
<rect>
<x>12</x>
<y>16</y>
<width>139</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QCheckBox" name="checkPlugInit">
<property name="geometry">
<rect>
<x>160</x>
<y>18</y>
<width>93</width>
<height>19</height>
</rect>
</property>
<property name="text">
<string>Init on startup</string>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections/>

View File

@@ -756,7 +756,7 @@ HBSlots::~HBSlots()
{
if( listBlock[ i ] != NULL )
{
HB_TRACE( HB_TR_ALWAYS, ( "......HBSlots::~HBSlots()...... [ Un-disConnected Slot ]" ) );
//HB_TRACE( HB_TR_ALWAYS, ( "......HBSlots::~HBSlots()...... [ Un-disConnected Slot ]" ) );
hb_itemRelease( listBlock.at( i ) );
listBlock[ i ] = NULL;
}