Git Product home page Git Product logo

eclim's Introduction

License GPL 3 Build Status Coverage Status MELPA MELPA Stable Open Source Helpers

No Longer Maintained

This package is no longer maintained.

A better Java programming environment can be set up using lsp-java. Please consider using it instead.

Overview

Join the chat at https://gitter.im/emacs-eclim/emacs-eclim

Eclim is an Eclipse plugin which exposes Eclipse features through a server interface. When this server is started, the command line utility eclim can be used to issue requests to that server.

The eclim package uses the Eclim Server to integrate Eclipse with Emacs. This project wants to bring some of the invaluable features from Eclipse to Emacs. Please note, the eclim package is limited to mostly Java support at this time.

It is also possible to start and stop the eclim daemon from Emacs using the eclimd package.

You can ask questions or discuss new features on the Gitter channel (see badge above), and at our Google Group

Package renamed

This package was originally called emacs-eclim, and was renamed to eclim on August 15, 2016 because use-package could not load it from the MELPA package archive.

A note about Eclim versions

Prior to version 1.7.3, Eclim used a proprietary protocol for communication with the Eclim Server. If you are running one of these older versions, you need version 0.1 of this package.

Eclim versions 1.7.3 and later however, serves responses using a standard JSON format. These are supported by versions 0.2 and later of this package.

The eclim package versions are tagged with the appropriate version number. You can see and download previous releases here.

Installation

emacs-eclim requires Emacs version 24.5 or later.

  1. Download and install eclim.

  2. Install emacs-eclim. You have two options:

    • Installation from the MELPA package archive. Just add the archive to package-archives if you haven't already, and then install the "eclim" package with the package-install command.
    • Manual installation from GitHub.
      1. (git clone git://github.com/emacs-eclim/emacs-eclim.git)
      2. Add (add-to-list 'load-path "/path/to/emacs-eclim/") to your startup script.
      3. Make sure all dependencies are available, see eclim-pkg.el.
  3. Add the following code to your emacs startup script:

    (require 'eclim)
    (setq eclimd-autostart t)
    
    (defun my-java-mode-hook ()
        (eclim-mode t))
    
    (add-hook 'java-mode-hook 'my-java-mode-hook)

    Or, if you prefer to enable eclim-mode globally:

    (require 'eclim)
    (setq eclimd-autostart t)
    (global-eclim-mode)

    If you wish to start the Eclim Server outside of Emacs, then set eclimd-autostart to nil.

Now every time you open a file that belongs to a Eclipse project eclim mode is enabled.

Configuration

Eclipse installation

Emacs-eclim tries its best to locate your Eclipse installation. If you have Eclipse installed in a non-standard location (i.e. ~/nonStandard/eclipse or /opt/eclipse) you may specify the paths manually by adding this to your startup script:

(custom-set-variables
  '(eclim-eclipse-dirs '("~/nonStandard/eclipse"))
  '(eclim-executable "~/nonStandard/eclipse/eclim"))

Displaying compilation error messages in the echo area

When the cursor is positioned on an error marker in a code buffer, emacs-eclim uses the local help feature in emacs to display the corresponding error message in the echo area. You can either invoke (display-local-help) manually or activate automatic display of local help by adding the following to .emacs:

(setq help-at-pt-display-when-idle t)
(setq help-at-pt-timer-delay 0.1)
(help-at-pt-set-timer)

Configuring auto-complete-mode

If you wish to use auto-complete-mode with emacs-eclim, add the following to your .emacs:

;; regular auto-complete initialization
(require 'auto-complete-config)
(ac-config-default)

;; add the emacs-eclim source
(require 'ac-emacs-eclim-source)
(ac-emacs-eclim-config)

Configuring company-mode

Emacs-eclim can integrate with company-mode to provide pop-up dialogs for auto-completion. To activate this, you need to add the following to your .emacs:

(require 'company)
(require 'company-emacs-eclim)
(company-emacs-eclim-setup)
(global-company-mode t)

Emacs-eclim completions in company are case sensitive by default. To make completions case insensitive set company-emacs-eclim-ignore-case to t.

If you installed Eclim from MELPA you will have to install company-emacs-eclim as well. Add the archive to package-archives if you haven't already, and then install the company-emacs-eclim package with the package-install command.

Configuring eclimd module

When emacs-eclim is configured correctly, you don't need to modify the configuration for the eclimd package. Still, in the customization group eclimd there are a few variables you can tweak.

Usage

To use eclim-mode's features eclimd must to be running (M-x eclimd-start or set eclimd-autostart to t) and the files you are editing have to be organized in a Eclipse project (M-x eclim-project-create).

Starting eclimd

Since most of eclim's commands require eclimd, you should ensure eclimd is running when you need it. Here are your options:

  • Variable eclimd-autostart: Enables automatic starting of eclimd whenever eclim-mode is enabled or when global-eclim-mode needs it.
  • Use the commands start-eclimd and stop-eclimd.
  • Start eclimd manually using Eclipse or a shell. If you always want to start eclimd like this you should add (setq eclimd-autostart nil) to your startup script to prevent accidental starting of eclimd from within Emacs.

Compiling this package

This package uses Cask to compile and test the project. Please install it prior to compiling the files. Package dependencies are installed using the make init command in a shell. Once dependencies have been installed, use make compile to compile the files.

Press

Read more about emacs-eclim:

Contributing

Have a quick look at our Contribution Guidelines and hack away.

eclim's People

Contributors

aarzilli avatar bbelleville avatar damiencassou avatar dgutov avatar eeemil avatar fred-o avatar gopar avatar jaigupta avatar jchochli avatar jiblits avatar jingtaozf avatar kleewho avatar kwvanderlinde avatar lespaul avatar luisgerhorst avatar nloyola avatar nverno avatar ovy avatar purcell avatar rlazo avatar sabof avatar senny avatar syohex avatar tsdh avatar useername avatar vedang avatar vhallac avatar vspinu avatar yivanusi avatar yveszoundi avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.