removing old balloon code
This commit is contained in:
parent
d6c68d691c
commit
ae137ecdd0
3 changed files with 2 additions and 75 deletions
|
|
@ -541,11 +541,11 @@ class DebugSession( object ):
|
|||
|
||||
@IfConnected()
|
||||
def ShowTooltip( self, winnr, expression, is_hover ):
|
||||
"""Proxy: ballonexpr -> variables.ShowBallon"""
|
||||
"""Proxy: ballonexpr -> variables.ShowTooltip"""
|
||||
frame = self._stackTraceView.GetCurrentFrame()
|
||||
# Check if RIP is in a frame
|
||||
if frame is None:
|
||||
self._logger.debug( 'Balloon: Not in a stack frame' )
|
||||
self._logger.debug( 'Tooltip: Not in a stack frame' )
|
||||
return ''
|
||||
|
||||
# Check if cursor in code window
|
||||
|
|
@ -561,25 +561,6 @@ class DebugSession( object ):
|
|||
def _CleanUpTooltip( self ):
|
||||
return self._variablesView._CleanUpTooltip()
|
||||
|
||||
@IfConnected()
|
||||
def ShowBalloon( self, winnr, expression ):
|
||||
"""Proxy: ballonexpr -> variables.ShowBallon"""
|
||||
frame = self._stackTraceView.GetCurrentFrame()
|
||||
# Check if RIP is in a frame
|
||||
if frame is None:
|
||||
self._logger.debug( 'Balloon: Not in a stack frame' )
|
||||
return ''
|
||||
|
||||
# Check if cursor in code window
|
||||
if winnr != int( self._codeView._window.number ):
|
||||
self._logger.debug( 'Winnr %s is not the code window %s',
|
||||
winnr,
|
||||
self._codeView._window.number )
|
||||
return ''
|
||||
|
||||
# Return variable aware function
|
||||
return self._variablesView.ShowBalloon( frame, expression )
|
||||
|
||||
@IfConnected()
|
||||
def ExpandFrameOrThread( self ):
|
||||
self._stackTraceView.ExpandFrameOrThread()
|
||||
|
|
|
|||
|
|
@ -616,43 +616,6 @@ class VariablesView( object ):
|
|||
|
||||
draw()
|
||||
|
||||
def ShowBalloon( self, frame, expression ):
|
||||
"""Callback to display variable under cursor `:h ballonexpr`"""
|
||||
if not self._connection:
|
||||
return ''
|
||||
|
||||
def handler( message ):
|
||||
# TODO: this result count be expandable, but we have no way to allow the
|
||||
# user to interact with the balloon to expand it, unless we use a popup
|
||||
# instead, but even then we don't really want to trap the cursor.
|
||||
body = message[ 'body' ]
|
||||
result = body[ 'result' ]
|
||||
if result is None:
|
||||
result = 'null'
|
||||
display = [
|
||||
'Type: ' + body.get( 'type', '<unknown>' ),
|
||||
'Value: ' + result
|
||||
]
|
||||
utils.DisplayBalloon( self._is_term, display )
|
||||
|
||||
def failure_handler( reason, message ):
|
||||
display = [ reason ]
|
||||
utils.DisplayBalloon( self._is_term, display )
|
||||
|
||||
# Send async request
|
||||
self._connection.DoRequest( handler, {
|
||||
'command': 'evaluate',
|
||||
'arguments': {
|
||||
'expression': expression,
|
||||
'frameId': frame[ 'id' ],
|
||||
'context': 'hover',
|
||||
}
|
||||
}, failure_handler )
|
||||
|
||||
# Return working (meanwhile)
|
||||
return '...'
|
||||
|
||||
|
||||
def SetSyntax( self, syntax ):
|
||||
# TODO: Switch to View.syntax
|
||||
self._current_syntax = utils.SetSyntax( self._current_syntax,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue