unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Carlos Konstanski <ckonstanski-XNJQVNuO2k8HDxLT3nJ8XNBPR1lH4CV8@public.gmane.org>
To: Paul Michael Reilly <pmr-9u8/wbatHBfQT0dZR+AlfA@public.gmane.org>
Cc: jdee-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	"Lennart Borgman (gmail)"
	<lennart.borgman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	emacs-devel-mXXj517/zsQ@public.gmane.org
Subject: Re: Implementing Eclipse's "organize-imports" in Emacs	Lisp
Date: Thu, 24 Jan 2008 06:59:10 -0700	[thread overview]
Message-ID: <87ve5juxxt.wl%ckonstanski@pippiandcarlos.com> (raw)
In-Reply-To: <4798473D.1010505-9u8/wbatHBfQT0dZR+AlfA@public.gmane.org>

At Thu, 24 Jan 2008 03:07:25 -0500,
Paul Michael Reilly wrote:
> 
> Lennart Borgman (gmail) wrote:
> > Paul Michael Reilly wrote:
> >> 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
> > 
> > 
> > Why not try to ask this on the JDEE developers list?
> 
> Seems like a reasonable idea...
> 
> But I will, against my better judgment, make the observation that JDEE 
> is pretty much "stuck" and that I have had a lot of problems trying to 
> ever find a stable combination of repository based Emacs AND some flavor 
> of JDEE so I pretty much abandoned JDEE, Paul's excellent work 
> notwithstanding.  Should JDEE become unstuck, I'll revisit making it 
> work with the Emacs development code.
> 
> -pmr

Try this in your .emacs file:

(defun jde-import-fixit ()
  "Combines jde-import-all, jde-import-kill-extra-imports and
jde-import-organize into one easy function call.  Emulates
eclipse's CTRL-SHIFT-O."
  (interactive)
  (jde-import-all)
  (jde-import-kill-extra-imports)
  (jde-import-organize)
  (save-buffer))

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2008-01-24 13:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ve5juxxt.wl%ckonstanski@pippiandcarlos.com \
    --to=ckonstanski-xnjqvnuo2k8hdxlt3nj8xnbpr1lh4cv8@public.gmane.org \
    --cc=emacs-devel-mXXj517/zsQ@public.gmane.org \
    --cc=jdee-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=lennart.borgman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pmr-9u8/wbatHBfQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).