2010-15-18 14:30 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbide/hbide.prg
  * contrib/hbide/ideedit.prg
  * contrib/hbide/ideeditor.prg
  * contrib/hbide/idetags.prg
    + Implemented: Context-menu option "Goto Function" looks 
        for the function/method in the current source first,
        and if found, jumps to that, otherwise it rellies on 
        tagging. It implies that functions in current source 
        are always can be reached with "Goto Function" option
        which operates on word under cursor.
This commit is contained in:
Pritpal Bedi
2010-05-18 21:35:15 +00:00
parent 3854243a55
commit 7f6a0de6de
5 changed files with 46 additions and 8 deletions

View File

@@ -17,6 +17,18 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-15-18 14:30 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/hbide.prg
* contrib/hbide/ideedit.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/idetags.prg
+ Implemented: Context-menu option "Goto Function" looks
for the function/method in the current source first,
and if found, jumps to that, otherwise it rellies on
tagging. It implies that functions in current source
are always can be reached with "Goto Function" option
which operates on word under cursor.
2010-15-18 13:00 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/ideprojmanager.prg
% Fixed: tab order in "Projects Properties" dialog.

View File

@@ -1274,7 +1274,7 @@ METHOD HbIde:CreateTags()
cComments := CheckComments( ::aText )
aSummary := Summarize( ::aText, cComments, @aSumData , iif( Upper( cExt ) == ".PRG", 9, 1 ) )
::aTags := UpdateTags( ::aSources[ i ], aSummary, aSumData, @::aFuncList, @::aLines )
::aTags := UpdateTags( ::aSources[ i ], aSummary, aSumData, @::aFuncList, @::aLines, ::aText )
#if 0
IF !empty( aTags )

View File

@@ -1441,11 +1441,17 @@ METHOD IdeEdit:find( cText, nPosFrom )
qCursor:setPosition( nPosFrom )
ENDIF
::qEdit:setTextCursor( qCursor )
IF ( lFound := ::qEdit:find( cText, QTextDocument_FindCaseSensitively ) )
::qEdit:centerCursor()
ELSE
IF ! ( lFound := ::qEdit:find( cText, QTextDocument_FindCaseSensitively ) )
IF ! hb_isNumeric( nPosFrom )
lFound := ::qEdit:find( cText, QTextDocument_FindBackward + QTextDocument_FindCaseSensitively )
ENDIF
ENDIF
IF ! lFound
qCursor:setPosition( nPos )
::qEdit:setTextCursor( qCursor )
ELSE
::qEdit:centerCursor()
ENDIF
RETURN lFound
@@ -1798,9 +1804,17 @@ METHOD IdeEdit:handleCurrentIndent()
/*----------------------------------------------------------------------*/
METHOD IdeEdit:gotoFunction()
LOCAL cWord
LOCAL cWord, n
LOCAL lFindCur := .f.
IF !empty( cWord := ::getWord( .f. ) )
::oFN:jumpToFunction( cWord, .t. )
IF ( n := ascan( ::aTags, {|e_| lower( cWord ) $ lower( e_[ 7 ] ) } ) ) > 0
IF ::find( alltrim( ::aTags[ n,8 ] ) )
lFindCur := .t.
ENDIF
ENDIF
IF ! lFindCur
::oFN:jumpToFunction( cWord, .t. )
ENDIF
ENDIF
RETURN Self

View File

@@ -167,6 +167,8 @@ CLASS IdeEditsManager INHERIT IdeObject
METHOD pageUp()
METHOD pageDown()
METHOD find( cString )
ENDCLASS
/*----------------------------------------------------------------------*/
@@ -1093,6 +1095,15 @@ METHOD IdeEditsManager:pageDown()
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
// Locating
/*----------------------------------------------------------------------*/
METHOD IdeEditsManager:find( cString )
LOCAL oEdit
IF !empty( oEdit := ::getEditObjectCurrent() )
oEdit:find( cString )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
//
// CLASS IdeEditor
// Holds One Document in One Tab

View File

@@ -71,7 +71,7 @@
/*----------------------------------------------------------------------*/
FUNCTION UpdateTags( cModule, aSummary, aSumData, aFuncList, aLines )
FUNCTION UpdateTags( cModule, aSummary, aSumData, aFuncList, aLines, aText )
LOCAL cType, cName, cSyntax, n, m, i, cSource, cExt
LOCAL cClassName := ""
LOCAL aTags := {}
@@ -174,7 +174,8 @@ FUNCTION UpdateTags( cModule, aSummary, aSumData, aFuncList, aLines )
cModule ,;
cSyntax ,;
cType ,;
Iif( cType = "METH", ":", "" ) + cSyntax ;
Iif( cType = "METH", ":", "" ) + cSyntax, ;
aText[ aSumData[ i,2 ] ] ;
};
)
ENDIF