javac checker custom classpath command added

This commit is contained in:
troydm 2014-01-04 23:09:18 +04:00
parent 4a7ca826b0
commit 0619f65ed5

View File

@ -68,6 +68,10 @@ if !exists('g:syntastic_java_javac_config_file')
let g:syntastic_java_javac_config_file = '.syntastic_javac_config' let g:syntastic_java_javac_config_file = '.syntastic_javac_config'
endif endif
if !exists('g:syntastic_java_javac_custom_classpath_command')
let g:syntastic_java_javac_custom_classpath_command = ''
endif
if !exists("g:syntastic_java_javac_maven_pom_ftime") if !exists("g:syntastic_java_javac_maven_pom_ftime")
let g:syntastic_java_javac_maven_pom_ftime = {} let g:syntastic_java_javac_maven_pom_ftime = {}
endif endif
@ -373,6 +377,17 @@ function! SyntaxCheckers_java_javac_GetLocList() dict
let javac_classpath = s:AddToClasspath(javac_classpath, s:GetMavenClasspath()) let javac_classpath = s:AddToClasspath(javac_classpath, s:GetMavenClasspath())
endif endif
" load custom classpath
if g:syntastic_java_javac_custom_classpath_command != ''
let lines = system(g:syntastic_java_javac_custom_classpath_command)
if has('win32') || has('win32unix') || has('win64')
let lines = substitute(lines,"\r\n","\n")
endif
for l in split(lines, "\n")
let javac_classpath = s:AddToClasspath(javac_classpath, l)
endfor
endif
if javac_classpath != '' if javac_classpath != ''
let javac_opts .= ' -cp "' . fnameescape(javac_classpath) . '"' let javac_opts .= ' -cp "' . fnameescape(javac_classpath) . '"'
endif endif