Added to jdb the option to specify custom command

This commit is contained in:
IdanArye 2014-01-18 01:21:02 +02:00
parent 69dab33ea3
commit 079aa3503f

View File

@ -1,6 +1,9 @@
function! vebugger#jdb#start(entryClass,args) function! vebugger#jdb#start(entryClass,args)
let l:debugger=vebugger#std#startDebugger('jdb'.( let l:debugger=vebugger#std#startDebugger(
\has_key(a:args,'classpath') \(has_key(a:args,'command')
\? (a:args.command)
\: 'jdb')
\.(has_key(a:args,'classpath')
\? ' -classpath '.fnameescape(a:args.classpath) \? ' -classpath '.fnameescape(a:args.classpath)
\: '')) \: ''))
let l:debugger.state.jdb={} let l:debugger.state.jdb={}
@ -51,13 +54,13 @@ function! s:readWhere(pipeName,line,readResult,debugger)
if 1==l:frameNumber " first stackframe is the current location if 1==l:frameNumber " first stackframe is the current location
let a:readResult.std.location={ let a:readResult.std.location={
\'file':(l:file), \'file':(l:file),
\'line':(l:matches[4])} \'line':str2nr(l:matches[4])}
endif endif
let a:readResult.std.callstack={ let a:readResult.std.callstack={
\'clearOld':('1'==l:frameNumber), \'clearOld':('1'==l:frameNumber),
\'add':'after', \'add':'after',
\'file':(l:file), \'file':(l:file),
\'line':(l:matches[4])} \'line':str2nr(l:matches[4])}
endif endif
endif endif
endfunction endfunction
@ -116,8 +119,8 @@ function! s:readEvaluatedExpressions(pipeName,line,readResult,debugger)
let l:expression=l:matches[1] let l:expression=l:matches[1]
let l:value=l:matches[2] let l:value=l:matches[2]
let a:readResult.std.evaluatedExpression={ let a:readResult.std.evaluatedExpression={
\'expression':(l:matches[1]), \'expression':(l:expression),
\'value':(l:matches[2])} \'value':(l:value)}
endif endif
endif endif
endfunction endfunction