[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company ca231bf 04/46: Remove company-eclim
From: |
Dmitry Gutov |
Subject: |
[elpa] externals/company ca231bf 04/46: Remove company-eclim |
Date: |
Wed, 30 Dec 2020 18:33:01 -0500 (EST) |
branch: externals/company
commit ca231bf9e794883f5669aea4bfb92464ec35427e
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Remove company-eclim
---
NEWS.md | 7 +++
company-eclim.el | 186 -------------------------------------------------------
company.el | 3 +-
3 files changed, 8 insertions(+), 188 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index f1f1d05..a16ff5d 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,12 @@
# History of user-visible changes
+## Next
+
+* `company-eclim` has been removed. Eclim is generally not recommended for
Emacs
+ users these days, with
+ ([emacs-eclim](https://github.com/emacs-eclim/emacs-eclim/)) declared
obsolete
+ in favor of `lsp-java`. Though it used its own backend anyway.
+
## 2020-07-26 (0.9.13)
* `company-clang`: error handling is more permissive.
diff --git a/company-eclim.el b/company-eclim.el
deleted file mode 100644
index b37f756..0000000
--- a/company-eclim.el
+++ /dev/null
@@ -1,186 +0,0 @@
-;;; company-eclim.el --- company-mode completion backend for Eclim
-
-;; Copyright (C) 2009, 2011, 2013, 2015 Free Software Foundation, Inc.
-
-;; Author: Nikolaj Schumacher
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-;;
-;; Using `emacs-eclim' together with (or instead of) this backend is
-;; recommended, as it allows you to use other Eclim features.
-;;
-;; The alternative backend provided by `emacs-eclim' uses `yasnippet'
-;; instead of `company-template' to expand function calls, and it supports
-;; some languages other than Java.
-
-;;; Code:
-
-(require 'company)
-(require 'company-template)
-(require 'cl-lib)
-
-(defgroup company-eclim nil
- "Completion backend for Eclim."
- :group 'company)
-
-(defun company-eclim-executable-find ()
- (let (file)
- (cl-dolist (eclipse-root '("/Applications/eclipse" "/usr/lib/eclipse"
- "/usr/local/lib/eclipse"))
- (and (file-exists-p (setq file (expand-file-name "plugins"
eclipse-root)))
- (setq file (car (last (directory-files file t "^org.eclim_"))))
- (file-exists-p (setq file (expand-file-name "bin/eclim" file)))
- (cl-return file)))))
-
-(defcustom company-eclim-executable
- (or (bound-and-true-p eclim-executable)
- (executable-find "eclim")
- (company-eclim-executable-find))
- "Location of eclim executable."
- :type 'file)
-
-(defcustom company-eclim-auto-save t
- "Determines whether to save the buffer when retrieving completions.
-eclim can only complete correctly when the buffer has been saved."
- :type '(choice (const :tag "Off" nil)
- (const :tag "On" t)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar-local company-eclim--project-dir 'unknown)
-
-(defvar-local company-eclim--project-name nil)
-
-(declare-function json-read "json")
-(defvar json-array-type)
-
-(defun company-eclim--call-process (&rest args)
- (let ((coding-system-for-read 'utf-8)
- res)
- (require 'json)
- (with-temp-buffer
- (if (= 0 (setq res (apply 'call-process company-eclim-executable nil t
nil
- "-command" args)))
- (let ((json-array-type 'list))
- (goto-char (point-min))
- (unless (eobp)
- (json-read)))
- (message "Company-eclim command failed with error %d:\n%s" res
- (buffer-substring (point-min) (point-max)))
- nil))))
-
-(defun company-eclim--project-list ()
- (company-eclim--call-process "project_list"))
-
-(defun company-eclim--project-dir ()
- (if (eq company-eclim--project-dir 'unknown)
- (let ((dir (locate-dominating-file buffer-file-name ".project")))
- (when dir
- (setq company-eclim--project-dir
- (directory-file-name
- (expand-file-name dir)))))
- company-eclim--project-dir))
-
-(defun company-eclim--project-name ()
- (or company-eclim--project-name
- (let ((dir (company-eclim--project-dir)))
- (when dir
- (setq company-eclim--project-name
- (cl-loop for project in (company-eclim--project-list)
- when (equal (cdr (assoc 'path project)) dir)
- return (cdr (assoc 'name project))))))))
-
-(defun company-eclim--candidates (prefix)
- (interactive "d")
- (let ((project-file (file-relative-name buffer-file-name
- (company-eclim--project-dir)))
- completions)
- (when company-eclim-auto-save
- (when (buffer-modified-p)
- (basic-save-buffer))
- ;; FIXME: Sometimes this isn't finished when we complete.
- (company-eclim--call-process "java_src_update"
- "-p" (company-eclim--project-name)
- "-f" project-file))
- (dolist (item (cdr (assoc 'completions
- (company-eclim--call-process
- "java_complete" "-p"
(company-eclim--project-name)
- "-f" project-file
- "-o" (number-to-string
- (company-eclim--search-point prefix))
- "-e" "utf-8"
- "-l" "standard"))))
- (let* ((meta (cdr (assoc 'info item)))
- (completion meta))
- (when (string-match " ?[(:-]" completion)
- (setq completion (substring completion 0 (match-beginning 0))))
- (put-text-property 0 1 'meta meta completion)
- (push completion completions)))
- (let ((completion-ignore-case nil))
- (all-completions prefix completions))))
-
-(defun company-eclim--search-point (prefix)
- (if (or (cl-plusp (length prefix)) (eq (char-before) ?.))
- (1- (point))
- (point)))
-
-(defun company-eclim--meta (candidate)
- (get-text-property 0 'meta candidate))
-
-(defun company-eclim--annotation (candidate)
- (let ((meta (company-eclim--meta candidate)))
- (when (string-match "\\(([^-]*\\) -" meta)
- (substring meta (match-beginning 1) (match-end 1)))))
-
-(defun company-eclim--prefix ()
- (let ((prefix (company-grab-symbol)))
- (when prefix
- ;; Completion candidates for annotations don't include '@'.
- (when (eq ?@ (string-to-char prefix))
- (setq prefix (substring prefix 1)))
- prefix)))
-
-(defun company-eclim (command &optional arg &rest ignored)
- "`company-mode' completion backend for Eclim.
-Eclim provides access to Eclipse Java IDE features for other editors.
-
-Eclim version 1.7.13 or newer (?) is required.
-
-Completions only work correctly when the buffer has been saved.
-`company-eclim-auto-save' determines whether to do this automatically."
- (interactive (list 'interactive))
- (cl-case command
- (interactive (company-begin-backend 'company-eclim))
- (prefix (and (derived-mode-p 'java-mode 'jde-mode)
- buffer-file-name
- company-eclim-executable
- (company-eclim--project-name)
- (not (company-in-string-or-comment))
- (or (company-eclim--prefix) 'stop)))
- (candidates (company-eclim--candidates arg))
- (meta (company-eclim--meta arg))
- ;; because "" doesn't return everything
- (no-cache (equal arg ""))
- (annotation (company-eclim--annotation arg))
- (post-completion (let ((anno (company-eclim--annotation arg)))
- (when anno
- (insert anno)
- (company-template-c-like-templatify anno))))))
-
-(provide 'company-eclim)
-;;; company-eclim.el ends here
diff --git a/company.el b/company.el
index 592c6d1..7906fb3 100644
--- a/company.el
+++ b/company.el
@@ -310,7 +310,6 @@ This doesn't include the margins and the scroll bar."
(company-css . "CSS")
(company-dabbrev . "dabbrev for plain text")
(company-dabbrev-code . "dabbrev for code")
- (company-eclim . "Eclim (an Eclipse interface)")
(company-elisp . "Emacs Lisp")
(company-etags . "etags")
(company-files . "Files")
@@ -339,7 +338,7 @@ This doesn't include the margins and the scroll bar."
(list 'company-nxml))
,@(unless (version<= "26" emacs-version)
(list 'company-css))
- company-eclim company-semantic company-clang
+ company-semantic company-clang
company-xcode company-cmake
company-capf
company-files
- [elpa] externals/company updated (24aefbd -> 123b604), Dmitry Gutov, 2020/12/30
- [elpa] externals/company 2158fbd 10/46: company-tooltip-width-grow-only: New option, Dmitry Gutov, 2020/12/30
- [elpa] externals/company c09e7ff 01/46: Remove unused variable, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 5eb7d86 07/46: Add some clarifications for the Customize interface, Dmitry Gutov, 2020/12/30
- [elpa] externals/company e1d5837 08/46: Use 'after-string' to render the popup, Dmitry Gutov, 2020/12/30
- [elpa] externals/company be8cf44 09/46: Tidy up a little, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 9e153fa 12/46: Restore Emacs < 26 compatibility, Dmitry Gutov, 2020/12/30
- [elpa] externals/company e393785 13/46: Add a FIXME, Dmitry Gutov, 2020/12/30
- [elpa] externals/company ca231bf 04/46: Remove company-eclim,
Dmitry Gutov <=
- [elpa] externals/company 10d7ee5 06/46: Remove company-xcode, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 57a6554 11/46: company-clang--parse-output: Filter out duplicates, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 520978c 02/46: Change the replacement character for non-printables, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 1b985d1 03/46: Set project-vc-merge-submodules to nil [ci skip], Dmitry Gutov, 2020/12/30
- [elpa] externals/company 664dd19 05/46: Move company-clang to after company-capf, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 54f60ef 14/46: Print the right buffer-local value, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 63b0535 15/46: Fixed badge url., Dmitry Gutov, 2020/12/30
- [elpa] externals/company d6df27f 17/46: Rename auto-complete to auto-commit, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 805637c 24/46: company-cmake: property completion candidates, Dmitry Gutov, 2020/12/30
- [elpa] externals/company c1e8972 18/46: company-selection: add company-selection-default to have better support for non-selection popup, Dmitry Gutov, 2020/12/30