all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Java programming and emacs
@ 2010-01-06 22:17 ` Xavier Maillard
  2010-01-07  2:59   ` Steve Revilak
  0 siblings, 1 reply; 10+ messages in thread
From: Xavier Maillard @ 2010-01-06 22:17 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I have started for a few weeks now coding for the Android
platform. That's pretty new to me and thus I am not really
informed of what I can use in Emacs to be more productive.

I am looking for a good setup that could integrate java
programming, checkstyle plugin support and SVN (code I am working
on is hosted on code.google.com).

Regards
	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




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

* Re: Java programming and emacs
  2010-01-06 22:17 ` Java programming and emacs Xavier Maillard
@ 2010-01-07  2:59   ` Steve Revilak
  2010-01-07  9:44     ` Tassilo Horn
  2010-01-08 23:01     ` Xavier Maillard
  0 siblings, 2 replies; 10+ messages in thread
From: Steve Revilak @ 2010-01-07  2:59 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]

>From: Xavier Maillard <xma@gnu.org>

>I have started for a few weeks now coding for the Android
>platform. That's pretty new to me and thus I am not really
>informed of what I can use in Emacs to be more productive.
>
>I am looking for a good setup that could integrate java
>programming, checkstyle plugin support and SVN (code I am working
>on is hosted on code.google.com).

I do a fair amount of java programming with emacs, so I can share a
few things that have been helpful for me.

  - If you're using ant to build your java code
    (setq compile-command "ant -find build.xml ") 
    is helpful

  - If you're using ant, set the environment variable
    "ANT_ARGS=-emacs".  This causes ant to emit output in a format that
    compliation mode can understand

  - If checkstyle has an ant task, then you can probably just run
    checkstyle with ant (i.e., put a checkstyle target in your build.xml).

  - For code navigation, gnu global works pretty well with java.
    Global seems to understand java's language structure a little
    better than etags does.

      http://www.gnu.org/software/global/

    Global comes with a lisp library for emacs integration.  I use it
    like this:

    (if (file-exists-p "~/.elisp/gtags.el")
        (progn
          (autoload 'gtags-mode "gtags" "" t)
          (setq java-mode-hook '(lambda () (gtags-mode 1)))
          )
      )

    Among other things, gtags-mode rebinds M-. to gtags-find-tags.
    Working in gtags-mode is similar to using regular TAGS tables.

    CEDET also looks promising, but I haven't had time to experiment
    with it.

  - vc should work fine with SVN.  At least that's been my experience.

Steve

[-- Attachment #2: Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Java programming and emacs
  2010-01-07  2:59   ` Steve Revilak
@ 2010-01-07  9:44     ` Tassilo Horn
  2010-01-08 22:57       ` Xavier Maillard
  2010-01-09 13:56       ` Andreas Röhler
  2010-01-08 23:01     ` Xavier Maillard
  1 sibling, 2 replies; 10+ messages in thread
From: Tassilo Horn @ 2010-01-07  9:44 UTC (permalink / raw)
  To: help-gnu-emacs

Steve Revilak <steve@srevilak.net> writes:

Hi!

>    CEDET also looks promising, but I haven't had time to experiment
>    with it.

Just for completeness, there's emacs-eclim [1], which is in very early
stages of development.  It uses the Eclim plugin to eclipse, to port all
of eclipse's features to emacs, like it was done for VIM.

Contributors are very welcome.  I somehow initiated that project, but
currently I don't find any free time to work on it.  But at least senny
and fred-o joined till now.

Bye,
Tassilo
__________
[1] http://www.emacswiki.org/emacs/EmacsEclim





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

* Re: Java programming and emacs
  2010-01-07  9:44     ` Tassilo Horn
@ 2010-01-08 22:57       ` Xavier Maillard
  2010-01-16  8:34         ` Tassilo Horn
  2010-01-09 13:56       ` Andreas Röhler
  1 sibling, 1 reply; 10+ messages in thread
From: Xavier Maillard @ 2010-01-08 22:57 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: help-gnu-emacs

Hi Tassilo,

   Steve Revilak <steve@srevilak.net> writes:

   Hi!

   >    CEDET also looks promising, but I haven't had time to experiment
   >    with it.

   Just for completeness, there's emacs-eclim [1], which is in very early
   stages of development.  It uses the Eclim plugin to eclipse, to port all
   of eclipse's features to emacs, like it was done for VIM.

As far as I understand, one needs eclipse in order to take
advantage of eclim, right ? If so, it won't work for me since I
live 100% in the linux console. Tell me if I am wrong and good
luck for your project.

	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




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

* Re: Java programming and emacs
  2010-01-07  2:59   ` Steve Revilak
  2010-01-07  9:44     ` Tassilo Horn
@ 2010-01-08 23:01     ` Xavier Maillard
  2010-01-09  0:54       ` Steve Revilak
  2010-01-09  3:56       ` Sean Sieger
  1 sibling, 2 replies; 10+ messages in thread
From: Xavier Maillard @ 2010-01-08 23:01 UTC (permalink / raw)
  To: Steve Revilak; +Cc: help-gnu-emacs

Hi Steve,

   >From: Xavier Maillard <xma@gnu.org>

   >I have started for a few weeks now coding for the Android
   >platform. That's pretty new to me and thus I am not really
   >informed of what I can use in Emacs to be more productive.
   >
   >I am looking for a good setup that could integrate java
   >programming, checkstyle plugin support and SVN (code I am working
   >on is hosted on code.google.com).

   I do a fair amount of java programming with emacs, so I can share a
   few things that have been helpful for me.

Thank you.

     - If you're using ant to build your java code
       (setq compile-command "ant -find build.xml ")
       is helpful

Yeah, I am stuck with ant and friends (maven2 is another tool I
am using). What do I need to load in order to use compile ?
(sorry I am really new to this).

     - If you're using ant, set the environment variable
       "ANT_ARGS=-emacs".  This causes ant to emit output in a
       format that compliation mode can understand

Ok.

     - If checkstyle has an ant task, then you can probably just run
       checkstyle with ant (i.e., put a checkstyle target in your build.xml).

What does this mean ? I have to add an ant task in my build
system ? Can't I just invoke checkstyle through emacs on a buffer
?

[SNIP]

       CEDET also looks promising, but I haven't had time to experiment
       with it.

What about JDEE ? Did you ever test it ? Sounds like something
for a serious java coder (which I am not ;)).

     - vc should work fine with SVN.  At least that's been my experience.

Ok. I really need to get acustomed to the VC mode one day.

Thank you.

	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




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

* Re: Java programming and emacs
  2010-01-08 23:01     ` Xavier Maillard
@ 2010-01-09  0:54       ` Steve Revilak
  2010-01-16  9:22         ` Lennart Borgman
  2010-01-09  3:56       ` Sean Sieger
  1 sibling, 1 reply; 10+ messages in thread
From: Steve Revilak @ 2010-01-09  0:54 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 2892 bytes --]

>>> I am looking for a good setup that could integrate java
>>> programming, checkstyle plugin support and SVN (code I am working
>>> on is hosted on code.google.com).

>>   I do a fair amount of java programming with emacs, so I can share a
>>   few things that have been helpful for me.
>>
>>     - If you're using ant to build your java code
>>       (setq compile-command "ant -find build.xml ")
>>       is helpful

> Yeah, I am stuck with ant and friends (maven2 is another tool I
> am using). What do I need to load in order to use compile ?
> (sorry I am really new to this).

You shouldn't need any special load or require statements to use
compile.  Start by typing M-x compile RET.  After doing so, the
minibuffer will be populated with the the value of `compile-command'.
The default compile-command is "make -k".  Putting

   (setq compile-command "ant -find build.xml ")

into ~/.emacs changes the value of compile-command, so that M-x
compile offers "ant -find build.xml ", instead of "make -k".

Once "ant -find build.xml" appears in the minibuffer, you can do one
of two things: press RETURN; or, provide additional command-line
arguments to ant (e.g., a build.xml target) and press RETURN.

Once you press RETURN, emacs runs ant, and the output goes to the
*Compilation* buffer.


>> - If you're using ant, set the environment variable
>>   "ANT_ARGS=-emacs".  This causes ant to emit output in a
>>   format that compliation mode can understand

> Ok.

If you've set ANT_ARGS=-emacs, then compile will be able to parse the
file/line location of each error.  Use C-x ` to iterate over the
errors.  Then compile again :)

I also have

   (define-key ctl-x-map "\^M" 'compile)

so that I can start a compilation with C-x RETURN.  But that's just a
personal preference.


>> - If checkstyle has an ant task, then you can probably just run
>>   checkstyle with ant (i.e., put a checkstyle target in your build.xml).

> What does this mean ? I have to add an ant task in my build
> system ? Can't I just invoke checkstyle through emacs on a buffer

Whenever I use syntax-checkers, etc. on a project, I've always set up
build.xml targets for them.  Having a build.xml target usually makes
the process very easy to automate.  Once I've written the ant task for
automation, then those ant tasks become the natural way to run the
syntax checkers interactively.  (They're just different compile
targets.)  This is just my personal preference.

It's been a very long time since I've used checkstyle, but there is an
ant task available [1], if you want to try that approach.

There may be a way to "just run checkstyle on a buffer", but I don't
have an easy recipie for doing so.


> What about JDEE ? Did you ever test it ? Sounds like something
> for a serious java coder (which I am not ;)).

Sorry, I've never tried JDEE.

Steve

[1] http://checkstyle.sourceforge.net/anttask.html


[-- Attachment #2: Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Java programming and emacs
  2010-01-08 23:01     ` Xavier Maillard
  2010-01-09  0:54       ` Steve Revilak
@ 2010-01-09  3:56       ` Sean Sieger
  1 sibling, 0 replies; 10+ messages in thread
From: Sean Sieger @ 2010-01-09  3:56 UTC (permalink / raw)
  To: help-gnu-emacs

Xavier Maillard <xma@gnu.org> writes:

    What about JDEE ? Did you ever test it ? Sounds like something
    for a serious java coder (which I am not ;)).


I don't know about serious, but I used it to rock my way through three
levels of Java progamming at school with it years ago.  My mates used
something purchased by the school and opaque to me and lame-ass
knock-offs of eclipse.





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

* Re: Java programming and emacs
  2010-01-07  9:44     ` Tassilo Horn
  2010-01-08 22:57       ` Xavier Maillard
@ 2010-01-09 13:56       ` Andreas Röhler
  1 sibling, 0 replies; 10+ messages in thread
From: Andreas Röhler @ 2010-01-09 13:56 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: help-gnu-emacs

Tassilo Horn wrote:
> Steve Revilak <steve@srevilak.net> writes:
> 
> Hi!
> 
>>    CEDET also looks promising, but I haven't had time to experiment
>>    with it.
> 
> Just for completeness, there's emacs-eclim [1], which is in very early
> stages of development.  It uses the Eclim plugin to eclipse, to port all
> of eclipse's features to emacs, like it was done for VIM.
> 
> Contributors are very welcome.  I somehow initiated that project, but
> currently I don't find any free time to work on it.  But at least senny
> and fred-o joined till now.
> 
> Bye,
> Tassilo
> __________
> [1] http://www.emacswiki.org/emacs/EmacsEclim
> 
> 
> 
> 

Hi Tassilo,

think its a very promessing project. Docking at eclipse should enable a range of
utilities. Emacs will line up with some of the most advanced programming tools
nowadays AFAIS.

Feel free to adress me, should you need some co-testers.

Andreas

--
https://code.launchpad.net/s-x-emacs-werkstatt/
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/






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

* Re: Java programming and emacs
  2010-01-08 22:57       ` Xavier Maillard
@ 2010-01-16  8:34         ` Tassilo Horn
  0 siblings, 0 replies; 10+ messages in thread
From: Tassilo Horn @ 2010-01-16  8:34 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: help-gnu-emacs

Xavier Maillard <xma@gnu.org> writes:

Hi Xavier,

>    Just for completeness, there's emacs-eclim [1], which is in very
>    early stages of development.  It uses the Eclim plugin to eclipse,
>    to port all of eclipse's features to emacs, like it was done for
>    VIM.
>
> As far as I understand, one needs eclipse in order to take advantage
> of eclim, right?

Yes.

> If so, it won't work for me since I live 100% in the linux
> console. Tell me if I am wrong and good luck for your project.

A "headless Eclipse" (one without GUI, acting as a daemon) suffices, but
a quick test shows that even this won't start on the console: Connection
refused. :-)

Out of interest: How do you cope with those emacs bindings that don't
work on the console, like M-/ and many others?  That always puts me back
on X.

Bye,
Tassilo




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

* Re: Java programming and emacs
  2010-01-09  0:54       ` Steve Revilak
@ 2010-01-16  9:22         ` Lennart Borgman
  0 siblings, 0 replies; 10+ messages in thread
From: Lennart Borgman @ 2010-01-16  9:22 UTC (permalink / raw)
  To: Steve Revilak; +Cc: help-gnu-emacs

>> What about JDEE ? Did you ever test it ? Sounds like something
>> for a serious java coder (which I am not ;)).
>
> Sorry, I've never tried JDEE.


There was a new release of JDEE just a few days ago:

    http://sourceforge.net/projects/jdee/




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

end of thread, other threads:[~2010-01-16  9:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20100107010315.A4F2A10AFB0@mxperim6.sea5.speakeasy.net>
2010-01-06 22:17 ` Java programming and emacs Xavier Maillard
2010-01-07  2:59   ` Steve Revilak
2010-01-07  9:44     ` Tassilo Horn
2010-01-08 22:57       ` Xavier Maillard
2010-01-16  8:34         ` Tassilo Horn
2010-01-09 13:56       ` Andreas Röhler
2010-01-08 23:01     ` Xavier Maillard
2010-01-09  0:54       ` Steve Revilak
2010-01-16  9:22         ` Lennart Borgman
2010-01-09  3:56       ` Sean Sieger

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.