From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carlos Konstanski Newsgroups: gmane.emacs.jdee.user,gmane.emacs.devel Subject: Re: Implementing Eclipse's "organize-imports" in Emacs Lisp Date: Thu, 24 Jan 2008 06:59:10 -0700 Message-ID: <87ve5juxxt.wl%ckonstanski@pippiandcarlos.com> References: <4795F934.9010703@gmail.com> <4798473D.1010505@pajato.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1201183185 15514 80.91.229.12 (24 Jan 2008 13:59:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jan 2008 13:59:45 +0000 (UTC) Cc: jdee-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, "Lennart Borgman (gmail)" , emacs-devel-mXXj517/zsQ@public.gmane.org To: Paul Michael Reilly Original-X-From: jdee-users-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Thu Jan 24 14:59:55 2008 Return-path: Envelope-to: geju-jdee-users@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by lo.gmane.org with esmtp (Exim 4.50) id 1JI2cU-0005aj-9h for geju-jdee-users@m.gmane.org; Thu, 24 Jan 2008 14:59:54 +0100 Original-Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id C0C25E8DA; Thu, 24 Jan 2008 05:59:26 -0800 (PST) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1JI2c0-000087-95 for jdee-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; Thu, 24 Jan 2008 05:59:24 -0800 Original-Received: from wsip-72-214-132-23.sv.om.cox.net ([72.214.132.23] helo=mail.pippiandcarlos.com) by mail.sourceforge.net with esmtp (Exim 4.44) id 1JI2bz-0000Lo-NH for jdee-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; Thu, 24 Jan 2008 05:59:24 -0800 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 30C229C1B13; Thu, 24 Jan 2008 06:59:15 -0700 (MST) Original-Received: from mail.pippiandcarlos.com ([127.0.0.1]) by localhost (mail.pippiandcarlos.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hpBS2QXOvX88; Thu, 24 Jan 2008 06:59:14 -0700 (MST) Original-Received: from hly19809lx.pippiandcarlos.com (hly19809lx.pippiandcarlos.com [192.168.1.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.pippiandcarlos.com (Postfix) with ESMTP id 1D9529E34CA; Thu, 24 Jan 2008 06:59:14 -0700 (MST) In-Reply-To: <4798473D.1010505-9u8/wbatHBfQT0dZR+AlfA@public.gmane.org> User-Agent: Wanderlust/2.14.1 (Bad Medicine-pre) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.1 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-Spam-Score: -2.8 (--) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 -2.8 ALL_TRUSTED Did not pass through any untrusted hosts X-BeenThere: jdee-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: jdee-users-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: jdee-users-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Xref: news.gmane.org gmane.emacs.jdee.user:5 gmane.emacs.devel:87438 Archived-At: 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/