vim/runtime
Aliaksei Budavei 368ef5a48c
patch 9.1.0935: SpotBugs compiler can be improved
Problem:  SpotBugs compiler can be improved
Solution: runtime(compiler): Improve defaults and error handling for
          SpotBugs; update test_compiler.vim (Aliaksei Budavei)

runtime(compiler): Improve defaults and error handling for SpotBugs

* Keep "spotbugs#DefaultPreCompilerTestAction()" defined but
  do not assign its Funcref to the "PreCompilerTestAction"
  key of "g:spotbugs_properties": there are no default and
  there can only be introduced arbitrary "*sourceDirPath"
  entries; therefore, this assignment is confusing at best,
  given that the function's implementation delegates to
  whatever "PreCompilerAction" is.

* Allow for the possibility of relative source pathnames
  passed as arguments to Vim for the Javac default actions,
  and the necessity to have them properly reconciled when
  the current working directory is changed.

* Do not expect users to remember or know that new source
  files ‘must be’ ":argadd"'d to be then known to the Javac
  default actions; so collect the names of Java-file buffers
  and Java-file Vim arguments; and let users providing the
  "@sources" file-lists in the "g:javac_makeprg_params"
  variable update these file-lists themselves.

* Strive to not leave behind a fire-once Syntax ":autocmd"
  for a Java buffer whenever an arbitrary pre-compile action
  errors out.

* Only attempt to run a post-compiler action in the absence
  of failures for a pre-compiler action.  Note that warnings
  and failures are treated alike (?!) by the Javac compiler,
  so when previews are tried out with "--enable-preview",
  remember about passing "-Xlint:-preview" too to also let
  SpotBugs have a go.

* Properly group conditional operators when testing for key
  entries in a user-defined variable.

* Also test whether "javaExternal" is defined when choosing
  an implementation for source-file parsing.

* Two commands are provided to toggle actions for buffer-local
  autocommands:
  - SpotBugsRemoveBufferAutocmd;
  - SpotBugsDefineBufferAutocmd.

For example, try this from "~/.vim/after/ftplugin/java.vim":
------------------------------------------------------------
if exists(':SpotBugsDefineBufferAutocmd') == 2
	SpotBugsDefineBufferAutocmd BufWritePost SigUSR1
endif
------------------------------------------------------------

And ":doautocmd java_spotbugs User" can be manually used at will.

closes: #16140

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:38:47 +01:00
..
autoload patch 9.1.0935: SpotBugs compiler can be improved 2024-12-16 21:38:47 +01:00
bitmaps
colors
compiler patch 9.1.0935: SpotBugs compiler can be improved 2024-12-16 21:38:47 +01:00
doc patch 9.1.0935: SpotBugs compiler can be improved 2024-12-16 21:38:47 +01:00
ftplugin patch 9.1.0935: SpotBugs compiler can be improved 2024-12-16 21:38:47 +01:00
icons
import/dist
indent runtime(typst): add definition lists to formatlistpat, update maintainer 2024-12-09 20:31:04 +01:00
keymap
lang
macros
pack/dist/opt runtime(helptoc): reload cached g:helptoc.shell_prompt when starting toc 2024-12-01 16:06:18 +01:00
plugin runtime(matchparen): Add matchparen_disable_cursor_hl config option 2024-11-04 20:46:54 +01:00
print
spell
syntax patch 9.1.0934: hard to view an existing buffer in the preview window 2024-12-16 21:22:09 +01:00
tools patch 9.1.0736: Unicode tables are outdated 2024-09-17 20:24:56 +02:00
tutor translation(it): add Italian translation for the interactive tutor 2024-12-15 21:36:55 +01:00
bugreport.vim
defaults.vim patch 9.1.0899: default for 'backspace' can be set in C code 2024-12-01 16:25:53 +01:00
delmenu.vim
doc.info
evim.vim
filetype.vim patch 9.1.0929: filetype: lalrpop files are not recognized 2024-12-15 19:22:17 +01:00
ftoff.vim
ftplugin.vim
ftplugof.vim
gvim.desktop
gvimrc_example.vim
hi16-action-make.png
hi22-action-make.png
icons.info
indent.vim
indoff.vim
macmap.vim
macros.info
makemenu.vim
menu.vim runtime(misc): Use consistent "Vim script" spelling 2024-10-13 19:16:42 +02:00
mswin.vim
optwin.vim patch 9.1.0911: Variable name for 'messagesopt' doesn't match short name 2024-12-07 16:09:08 +01:00
scripts.vim
synmenu.vim
termcap
tools.info
tutor.info
vim.desktop
vim16x16.gif
vim16x16.png
vim16x16.xpm
vim32x32.gif
vim32x32.png
vim32x32.xpm
vim48x48.gif
vim48x48.png
vim48x48.xpm
vimlogo.cdr
vimlogo.eps
vimlogo.gif
vimlogo.pdf
vimlogo.svg
vimlogo.xpm
vimrc_example.vim