unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Implementing Eclipse's "organize-imports" in Emacs Lisp
@ 2008-01-22 10:53 Paul Michael Reilly
  2008-01-22 14:09 ` Lennart Borgman (gmail)
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Paul Michael Reilly @ 2008-01-22 10:53 UTC (permalink / raw)
  To: emacs-devel

I probably spend half my time doing Java development in Emacs and the
other half in Eclipse.  I once tried to get the Eclipse plugin that
talks to Emacsclient to work better for me with only marginal success.
It is an option to revive this effort.  But even if this were to work
nicely, it's appeal is limited to Eclipse developers leaving NetBeans,
IntelliJ, JBuilder, etc. Users out of the solution space.

One of the Eclipse features that I find indispensable is the Organize
Imports feature which analyses the source file to determine if the
import statements need to be pruned, augmented or modified (based on
the .classpath file which is problematic since this file is an Eclipse
artifact).  I would dearly love to have this capability in Emacs.

Have either of the other two Java developers who use Emacs done this
perchance?  :-)  I'm guessing not.

Assuming it does not exist, I'd be inclined to create a Java
application to run in the background which provides an IPC mechanism
to talk to Emacs Lisp.  Then I would develop "features" in this proxy
app for Emacs that are more natural to implement in Java.  I'm
guessing that a "daemon" type app is better than a typical Unix tool
approach (because of painful start-up latencies that won't likely be
solved for a few years ubiquitously)

Anyone feel this is just a totally wrong way to go to solve the
problem?

-pmr

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: Implementing Eclipse's "organize-imports" in Emacs Lisp
@ 2008-02-07 19:05 Klotz, Leigh
  0 siblings, 0 replies; 17+ messages in thread
From: Klotz, Leigh @ 2008-02-07 19:05 UTC (permalink / raw)
  To: emacs-devel

I found this thread because I showed an Eclipse-using colleague
flymake-mode for Java, and he asked about oragnize-imports.

Credmp made flymake-mode for Java use just the ECJ compiler from Eclipse
and EMACS flymake mode.  As for RMS's question below, the startup time
for running Java and the ECJ compiler is small and not that noticeable
when flymake-mode activates it. I don't know if having a perssitent
compiler server a la jde-ecj-server would be useful, especially for
something done rarely and intentionally such as organize-imports.

Here's where I found out about flymake-mode for Java:
http://www.credmp.org/index.php/2007/07/20/on-the-fly-syntax-checking-ja
va-in-emacs/

The credmp.org functions make unnecessary use of JDE and had a couple of
bugs with 22.1.1. 
I've been able to make it work without JDE at all.  Here's what I'm
using:
http://graflex.org/klotz/weblog/2008/02/java-error-highlighting-in-emacs
.html


Leigh.

---------------------------------------

From: 	Richard Stallman
Subject: 	Re: Implementing Eclipse's "organize-imports" in Emacs
Lisp
Date: 	Mon, 28 Jan 2008 16:33:05 -0500

    I don't how much of it is the GUI bits (which presumably Emacs
wouldn't
    use), but the normal Eclipse app is _extremely_ slow just to start,
even
    before you load a project.

    Of course it _also_ consumes vast amounts of memory, which make
having a
    persistent process around a bit less inviting ... :-(

Unless someone wants to write a totally new program, either we
use that one or we don't.

Someone interested in this should actually TRY doing this operation
without the GUI.  Speculating about it is not worth our time.





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-02-07 19:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-22 10:53 Implementing Eclipse's "organize-imports" in Emacs Lisp Paul Michael Reilly
2008-01-22 14:09 ` Lennart Borgman (gmail)
2008-01-24  8:07   ` Paul Michael Reilly
2008-01-24  8:17     ` Lennart Borgman (gmail)
     [not found]     ` <4798473D.1010505-9u8/wbatHBfQT0dZR+AlfA@public.gmane.org>
2008-01-24 13:59       ` Carlos Konstanski
2008-01-24 18:41         ` [jdee-users] " Paul Michael Reilly
2008-01-25  0:53       ` Yee Keat Phuah
2008-01-25  0:26         ` Tom Tromey
2008-01-25  8:36           ` Tassilo Horn
2008-01-25 16:40             ` Alan Shutko
2008-01-22 15:54 ` Tom Tromey
2008-01-28  7:18 ` Richard Stallman
2008-01-28  8:05   ` Miles Bader
2008-01-28 21:33     ` Richard Stallman
2008-01-28 12:09   ` Paul Michael Reilly
2008-01-28 21:32     ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2008-02-07 19:05 Klotz, Leigh

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).