#NEWLINE# def run( self , edit ) : #NEWLINE# #INDENT# view = self . view #NEWLINE# syntaxName = getExtension ( view . settings ( ) . get ( 'syntax' ) ) #NEWLINE# log ( ) . info ( "Requested goto definition for syntax type '%s'" , syntaxName ) #NEWLINE# if ( ( not isSupportedSyntax ( syntaxName ) ) or ( len ( view . sel ( ) ) == 0 ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# text = view . substr ( sublime . Region ( 0 , view . size ( ) ) ) #NEWLINE# caret = view . sel ( ) [ 0 ] . a #NEWLINE# log ( ) . info ( "Requested goto definition for '%s': '%s'" , view . file_name ( ) , getRowCol ( view , caret ) ) #NEWLINE# response = gFuse . msgManager . sendRequest ( gFuse . interop , 'Fuse.GotoDefinition' , { #NEWLINE# #INDENT# 'Path' : view . file_name ( ) , #NEWLINE# 'Text' : text , #NEWLINE# 'SyntaxType' : syntaxName , #NEWLINE# 'CaretPosition' : getRowCol ( view , caret ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( response == None ) : #NEWLINE# #INDENT# log ( ) . info ( 'No response for goto definition' ) #NEWLINE# return #NEWLINE# #UNINDENT# if ( response . status != 'Success' ) : #NEWLINE# #INDENT# log ( ) . error ( "Error in goto definition: '%s'" , response . status ) #NEWLINE# return #NEWLINE# #UNINDENT# gotoDefinition ( response . data )