From 8e2a1a0e8d1f896edf0ab6d9ea6b7216ae244253 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Thu, 4 Apr 2024 21:34:15 +0200
Subject: gnu: Add java-autocomplete.

* gnu/packages/textutils.scm (java-autocomplete): New variable.

Change-Id: Ied62d45ab53fca84d448652cce5e82d971f41703
---
 gnu/packages/textutils.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 0ad0638771..484ba6939b 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -976,6 +976,48 @@ (define-public java-rsyntaxtextarea
 source code.")
     (license license:bsd-3)))
 
+(define-public java-autocomplete
+  (package
+    (name "java-autocomplete")
+    (version "3.3.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/bobbylight/AutoComplete")
+                     (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0ksa3k3xkdjpyq9sbsvchyhfzzpb67pv8xzbpljj8rqilgk8ysy0"))))
+    (build-system ant-build-system)
+    (arguments
+     (list
+      #:tests? #false ;needs junit5
+      #:jar-name "autocomplete.jar"
+      #:source-dir "AutoComplete/src/main/java"
+      #:test-dir "AutoComplete/src/test"
+      #:phases
+      '(modify-phases %standard-phases
+         (add-before 'build 'copy-resources
+           (lambda _
+             (copy-recursively "AutoComplete/src/main/resources" "build/classes"))))))
+    (propagated-inputs
+     (list java-rsyntaxtextarea))
+    (native-inputs
+     (list java-hamcrest-core))
+    (home-page "https://github.com/bobbylight/AutoComplete")
+    (synopsis "Text completion library")
+    (description "AutoComplete is a library allowing you to add IDE-like
+auto-completion (aka \"code completion\" or \"Intellisense\") to any Swing
+JTextComponent.  Special integration is added for @code{RSyntaxTextArea},
+since this feature is commonly needed when editing source code.  Features
+include: Drop-down completion choice list. Optional companion \"description\"
+window, complete with full HTML support and navigable with hyperlinks.
+Optional parameter completion assistance for functions and methods, ala
+Eclipse and NetBeans.  Completion information is typically specified in an XML
+file, but can even be dynamic.")
+    (license license:bsd-3)))
+
 ;; We use the sources from git instead of the tarball from pypi, because the
 ;; latter does not include the Cython source file from which bycython.cpp is
 ;; generated.
-- 
cgit v1.2.3