You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Slatcher <st...@scientia.com> on 2002/12/18 12:41:45 UTC

Ant-Editor Integration

Hi all

I have been using Ant for a while now and have recently been looking at a
few editors and IDEs for Java development.  I am perfectly happy to build
my Ant files in an ordinary text editor, and execute Ant target from the
command line.

What I really would like however is a Java source editor (it doesn't have
to be a full IDE) that recognises classpaths I have set up in my build.xml
(presumably linked to a javac command), rather than requiring me to
maintain a project and/or classpath independently for the editor.  I may be
wrong, but the IDEs I have looked at so far (mainly NetBeans - Eclipse and
JDEE to a lesser extent) do not seem to be capable of this.  If anyone can
point me towards such an editor I would be very grateful.

If you point me to NetBeans I would be even more grateful if you could tell
me how do do it.  The only way I found was to independently mount my
classes dir and jar files on the "filesystem".

Many thanks

Steve Slatcher


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant-Editor Integration

Posted by Steve Slatcher <st...@scientia.com>.
Phillip Lord wrote:
>>>>>> "Steve" == Steve Slatcher <st...@scientia.com> writes:

>   Steve> What I really would like however is a Java source editor (it
>   Steve> doesn't have to be a full IDE) that recognises classpaths I
>   Steve> have set up in my build.xml (presumably linked to a javac
>   Steve> command), rather than requiring me to maintain a project
>   Steve> and/or classpath independently for the editor.
>
> I've thought about this for a while. I use Emacs JDEE, and its
> irritating to have to set up classpaths twice. I haven't got a generic
> solution for this yet, but for something like Emacs, where the project
> file is straight forward plain text (well lisp anyway), it would be
> easy enough to use an ant "replace" task, to update the project file,
> based on the ant values.
>
> I'm sure you could do something similar with eclipse, assuming it has
> an non opaque project file system. Of course, how the IDE will cope
> with having its files changed underneath it is a different issue.

Interesting idea.  Presumably not impossible with NetBeans either.  In fact
in principle Ant could control even more aspects of an IDE, e.g. it could
be used to load all the source files for a package.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant-Editor Integration

Posted by Phillip Lord <p....@russet.org.uk>.
>>>>> "Steve" == Steve Slatcher <st...@scientia.com> writes:

  Steve> Hi all I have been using Ant for a while now and have
  Steve> recently been looking at a few editors and IDEs for Java
  Steve> development.  I am perfectly happy to build my Ant files in
  Steve> an ordinary text editor, and execute Ant target from the
  Steve> command line.

  Steve> What I really would like however is a Java source editor (it
  Steve> doesn't have to be a full IDE) that recognises classpaths I
  Steve> have set up in my build.xml (presumably linked to a javac
  Steve> command), rather than requiring me to maintain a project
  Steve> and/or classpath independently for the editor.  I may be
  Steve> wrong, but the IDEs I have looked at so far (mainly NetBeans
  Steve> - Eclipse and JDEE to a lesser extent) do not seem to be
  Steve> capable of this.  If anyone can point me towards such an
  Steve> editor I would be very grateful.


I've thought about this for a while. I use Emacs JDEE, and its
irritating to have to set up classpaths twice. I haven't got a generic
solution for this yet, but for something like Emacs, where the project
file is straight forward plain text (well lisp anyway), it would be
easy enough to use an ant "replace" task, to update the project file,
based on the ant values. 

I'm sure you could do something similar with eclipse, assuming it has
an non opaque project file system. Of course, how the IDE will cope
with having its files changed underneath it is a different issue. 

Phil 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant-Editor Integration

Posted by Bud Williams <Bu...@Oracle.com>.
Steve
 Oracle JDeveloper has a very good Ant integration, with IDE support.
Bud
----- Original Message -----
From: "Steve Slatcher" <st...@scientia.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, December 18, 2002 6:41 AM
Subject: Ant-Editor Integration


> Hi all
>
> I have been using Ant for a while now and have recently been looking at a
> few editors and IDEs for Java development.  I am perfectly happy to build
> my Ant files in an ordinary text editor, and execute Ant target from the
> command line.
>
> What I really would like however is a Java source editor (it doesn't have
> to be a full IDE) that recognises classpaths I have set up in my build.xml
> (presumably linked to a javac command), rather than requiring me to
> maintain a project and/or classpath independently for the editor.  I may
be
> wrong, but the IDEs I have looked at so far (mainly NetBeans - Eclipse and
> JDEE to a lesser extent) do not seem to be capable of this.  If anyone can
> point me towards such an editor I would be very grateful.
>
> If you point me to NetBeans I would be even more grateful if you could
tell
> me how do do it.  The only way I found was to independently mount my
> classes dir and jar files on the "filesystem".
>
> Many thanks
>
> Steve Slatcher
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant-Editor Integration

Posted by Vilya Harvey <vi...@digitalsteps.com>.
IntelliJ IDEA (http://www.intellij.com/idea) has Ant integration, although
again quite as tight as you would like. It still requires you to set up your
project classpath from within the IDE rather than from you Ant script. There
have been a number of IDEA users asking for this though (it's request #2838
in their bug tracker), so it may come about eventually. There's a plugin
available which will generate a basic Ant file for you, based on your
project settings, but mainly what you get get from IDEA is very nice editing
of your Ant script: code completion within your script file - even down to
the level of it being aware of property names that have been referenced via
a <property file="..."/> entry - in place error highlighting and a few
simple refactorings (although they're nowhere near as rich as the
refactorings it provides for Java code). It also lets you assign hotkeys to
targets from a script file and set up targets to automatically run
before/after compiling or running the program.

By the way, I'm not affiliated with IntelliJ at all - just a happy user of
their product.

Cheers,
Vil.
--
Vilya Harvey, Consultant
vilya.harvey@digitalsteps.com                 / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457                 http://www.digitalsteps.com/

--Disclaimer--

This e-mail and any attachments may be confidential and/or legally
privileged. If you have received this email and you are not a named
addressee, please inform the sender at Digital Steps Ltd by phone on
+44 (0)1483 469 480 or by reply email and then delete the email from
your system. If you are not a named addressee you must not use,
disclose, distribute, copy, print or rely on this email. Although
Digital Steps Ltd routinely screens for viruses, addressees should
check this email and any attachments for viruses. Digital Steps Ltd
makes no representation or warranty as to the absence of viruses in this
email or any attachments.


----- Original Message -----
From: "Steve Slatcher" <st...@scientia.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, December 18, 2002 2:31 PM
Subject: Re: Ant-Editor Integration


> You can execute Ant targets from NetBeans.  NetBeans is however
> particulalry annoying in that the editor marks as errors attempts to use
> classes that it does not know about, i.e. classes not "on its classpath",
> or "mounted" to use NetBean-speak.
>
> Even as I write this, I am evaluating JEdit..  Whilst it is not as
annoying
> as NetBeans, in so far as it does not nag it it cannot find a class, it
> obviously cannot help with code completion on methods it knows nothing
> about.  I was unaware of AntFarm - I'll take a look, thanks.
>
> Maybe I am being too fussy, but it would be really nice to get code
> completion, and to be warned about classes not on the path when they are
> missing from a specified javac command, and not to be warned if they are
> not missing.  That is what I was expecting from Ant-integration.
> Presumably editors/IDEs also need to know this class information if they
> are to run programs in a debugger.
>
> Matt Moran wrote:
> > I use jEdit (www.jedit.org) with the "AntFarm" plugin.  When I want to
> > compile, I don't even bother with the "Compile Current Buffer"
> > command, because that would require me to set up my classpath within
> > the editor, etc. Instead, I just invoke the "AntFarm->Run current
> > target" command, which does the compile.  That way javac is only ever
> > invoked from within ant, and I always know exactly what classpath it
> > is using.
> >
> > I used to use JDEE, and you can do pretty much the same thing in that
> > environment.  In my opinion, setting up the buffer compile features
> > in JDEE is a waste of time.  Just set it up to use Ant, and do all of
> > your compilation that way.
> >
> > I've never used NetBeans, but I bet you can do the same thing.
> >
> > Hope this helps.
> >
> > -Matt Moran
> >
> > ----- Original Message -----
> > From: "Steve Slatcher" <st...@scientia.com>
> > To: <an...@jakarta.apache.org>
> > Sent: Wednesday, December 18, 2002 5:41 AM
> > Subject: Ant-Editor Integration
> >
> >
> >> Hi all
> >>
> >> I have been using Ant for a while now and have recently been looking
> >> at a few editors and IDEs for Java development.  I am perfectly
> >> happy to build my Ant files in an ordinary text editor, and execute
> >> Ant target from the command line.
> >>
> >> What I really would like however is a Java source editor (it doesn't
> >> have to be a full IDE) that recognises classpaths I have set up in
> >> my build.xml (presumably linked to a javac command), rather than
> >> requiring me to maintain a project and/or classpath independently
> >> for the editor.  I may be wrong, but the IDEs I have looked at so
> >> far (mainly NetBeans - Eclipse and JDEE to a lesser extent) do not
> >> seem to be capable of this.  If anyone can point me towards such an
> >> editor I would be very grateful.
> >>
> >> If you point me to NetBeans I would be even more grateful if you
> >> could tell me how do do it.  The only way I found was to
> >> independently mount my classes dir and jar files on the "filesystem".
> >>
> >> Many thanks
> >>
> >> Steve Slatcher
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:   <mailto:ant-user-
> >> unsubscribe@jakarta.apache.org> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant-Editor Integration

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Vilya Harvey" <vi...@digitalsteps.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, December 18, 2002 11:48
Subject: Re: Ant-Editor Integration


> In the bin directory of your IDEA installation, you'll find a file called
> idea.lax. This is a properties file containing all of the arguments used
to
> run IDEA. Any additional command line arguments should be added to the
> lax.nl.java.option.additional property.
>

thanks, got it


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant-Editor Integration

Posted by Vilya Harvey <vi...@digitalsteps.com>.
In the bin directory of your IDEA installation, you'll find a file called
idea.lax. This is a properties file containing all of the arguments used to
run IDEA. Any additional command line arguments should be added to the
lax.nl.java.option.additional property.

Hope that helps,
Vil.
--
Vilya Harvey, Consultant
vilya.harvey@digitalsteps.com                 / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457                 http://www.digitalsteps.com/

--Disclaimer--

This e-mail and any attachments may be confidential and/or legally
privileged. If you have received this email and you are not a named
addressee, please inform the sender at Digital Steps Ltd by phone on
+44 (0)1483 469 480 or by reply email and then delete the email from
your system. If you are not a named addressee you must not use,
disclose, distribute, copy, print or rely on this email. Although
Digital Steps Ltd routinely screens for viruses, addressees should
check this email and any attachments for viruses. Digital Steps Ltd
makes no representation or warranty as to the absence of viruses in this
email or any attachments.


----- Original Message -----
From: "Steve Loughran" <st...@iseran.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, December 18, 2002 5:37 PM
Subject: Re: Ant-Editor Integration


>
> ----- Original Message -----
> From: "Steve Slatcher" <st...@scientia.com>
> To: "Ant Users List" <an...@jakarta.apache.org>
> Sent: Wednesday, December 18, 2002 06:31
> Subject: Re: Ant-Editor Integration
>
>
> > You can execute Ant targets from NetBeans.  NetBeans is however
> > particulalry annoying in that the editor marks as errors attempts to use
> > classes that it does not know about, i.e. classes not "on its
classpath",
> > or "mounted" to use NetBean-speak.
> >
> > Even as I write this, I am evaluating JEdit..  Whilst it is not as
> annoying
> > as NetBeans, in so far as it does not nag it it cannot find a class, it
> > obviously cannot help with code completion on methods it knows nothing
> > about.  I was unaware of AntFarm - I'll take a look, thanks.
> >
> > Maybe I am being too fussy, but it would be really nice to get code
> > completion, and to be warned about classes not on the path when they are
> > missing from a specified javac command, and not to be warned if they are
> > not missing.  That is what I was expecting from Ant-integration.
> > Presumably editors/IDEs also need to know this class information if they
> > are to run programs in a debugger.
>
> I use IDEA, and take the hit of having to maintain both classpath
settings.
> But I do other tricks and have the source to apache projects I depend up
> (like Apache axis) mounted as source dirs, so get really good integration
> across the libraries I use.
>
> (BTW idea3.0 is out, seems very solid so far, though I'd like to know how
to
> specify a different GC, as with the .bat way of starting the beta
releases,
> I'd moved over to the parallel GC in 1.4.01 to get rid of those long
pauses
> that java GUI apps have every so often, and now they are back.)
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant-Editor Integration

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Steve Slatcher" <st...@scientia.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, December 18, 2002 06:31
Subject: Re: Ant-Editor Integration


> You can execute Ant targets from NetBeans.  NetBeans is however
> particulalry annoying in that the editor marks as errors attempts to use
> classes that it does not know about, i.e. classes not "on its classpath",
> or "mounted" to use NetBean-speak.
>
> Even as I write this, I am evaluating JEdit..  Whilst it is not as
annoying
> as NetBeans, in so far as it does not nag it it cannot find a class, it
> obviously cannot help with code completion on methods it knows nothing
> about.  I was unaware of AntFarm - I'll take a look, thanks.
>
> Maybe I am being too fussy, but it would be really nice to get code
> completion, and to be warned about classes not on the path when they are
> missing from a specified javac command, and not to be warned if they are
> not missing.  That is what I was expecting from Ant-integration.
> Presumably editors/IDEs also need to know this class information if they
> are to run programs in a debugger.

I use IDEA, and take the hit of having to maintain both classpath settings.
But I do other tricks and have the source to apache projects I depend up
(like Apache axis) mounted as source dirs, so get really good integration
across the libraries I use.

(BTW idea3.0 is out, seems very solid so far, though I'd like to know how to
specify a different GC, as with the .bat way of starting the beta releases,
I'd moved over to the parallel GC in 1.4.01 to get rid of those long pauses
that java GUI apps have every so often, and now they are back.)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant-Editor Integration

Posted by Steve Slatcher <st...@scientia.com>.
You can execute Ant targets from NetBeans.  NetBeans is however
particulalry annoying in that the editor marks as errors attempts to use
classes that it does not know about, i.e. classes not "on its classpath",
or "mounted" to use NetBean-speak.

Even as I write this, I am evaluating JEdit..  Whilst it is not as annoying
as NetBeans, in so far as it does not nag it it cannot find a class, it
obviously cannot help with code completion on methods it knows nothing
about.  I was unaware of AntFarm - I'll take a look, thanks.

Maybe I am being too fussy, but it would be really nice to get code
completion, and to be warned about classes not on the path when they are
missing from a specified javac command, and not to be warned if they are
not missing.  That is what I was expecting from Ant-integration.
Presumably editors/IDEs also need to know this class information if they
are to run programs in a debugger.

Matt Moran wrote:
> I use jEdit (www.jedit.org) with the "AntFarm" plugin.  When I want to
> compile, I don't even bother with the "Compile Current Buffer"
> command, because that would require me to set up my classpath within
> the editor, etc. Instead, I just invoke the "AntFarm->Run current
> target" command, which does the compile.  That way javac is only ever
> invoked from within ant, and I always know exactly what classpath it
> is using.
>
> I used to use JDEE, and you can do pretty much the same thing in that
> environment.  In my opinion, setting up the buffer compile features
> in JDEE is a waste of time.  Just set it up to use Ant, and do all of
> your compilation that way.
>
> I've never used NetBeans, but I bet you can do the same thing.
>
> Hope this helps.
>
> -Matt Moran
>
> ----- Original Message -----
> From: "Steve Slatcher" <st...@scientia.com>
> To: <an...@jakarta.apache.org>
> Sent: Wednesday, December 18, 2002 5:41 AM
> Subject: Ant-Editor Integration
>
>
>> Hi all
>>
>> I have been using Ant for a while now and have recently been looking
>> at a few editors and IDEs for Java development.  I am perfectly
>> happy to build my Ant files in an ordinary text editor, and execute
>> Ant target from the command line.
>>
>> What I really would like however is a Java source editor (it doesn't
>> have to be a full IDE) that recognises classpaths I have set up in
>> my build.xml (presumably linked to a javac command), rather than
>> requiring me to maintain a project and/or classpath independently
>> for the editor.  I may be wrong, but the IDEs I have looked at so
>> far (mainly NetBeans - Eclipse and JDEE to a lesser extent) do not
>> seem to be capable of this.  If anyone can point me towards such an
>> editor I would be very grateful.
>>
>> If you point me to NetBeans I would be even more grateful if you
>> could tell me how do do it.  The only way I found was to
>> independently mount my classes dir and jar files on the "filesystem".
>>
>> Many thanks
>>
>> Steve Slatcher
>>
>>
>> --
>> To unsubscribe, e-mail:   <mailto:ant-user-
>> unsubscribe@jakarta.apache.org> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant-Editor Integration

Posted by Matt Moran <ma...@mattnliz.net>.
I use jEdit (www.jedit.org) with the "AntFarm" plugin.  When I want to
compile, I don't even bother with the "Compile Current Buffer" command,
because that would require me to set up my classpath within the editor, etc.
Instead, I just invoke the "AntFarm->Run current target" command, which does
the compile.  That way javac is only ever invoked from within ant, and I
always know exactly what classpath it is using.

I used to use JDEE, and you can do pretty much the same thing in that
environment.  In my opinion, setting up the buffer compile features in JDEE
is a waste of time.  Just set it up to use Ant, and do all of your
compilation that way.

I've never used NetBeans, but I bet you can do the same thing.

Hope this helps.

-Matt Moran

----- Original Message -----
From: "Steve Slatcher" <st...@scientia.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, December 18, 2002 5:41 AM
Subject: Ant-Editor Integration


> Hi all
>
> I have been using Ant for a while now and have recently been looking at a
> few editors and IDEs for Java development.  I am perfectly happy to build
> my Ant files in an ordinary text editor, and execute Ant target from the
> command line.
>
> What I really would like however is a Java source editor (it doesn't have
> to be a full IDE) that recognises classpaths I have set up in my build.xml
> (presumably linked to a javac command), rather than requiring me to
> maintain a project and/or classpath independently for the editor.  I may
be
> wrong, but the IDEs I have looked at so far (mainly NetBeans - Eclipse and
> JDEE to a lesser extent) do not seem to be capable of this.  If anyone can
> point me towards such an editor I would be very grateful.
>
> If you point me to NetBeans I would be even more grateful if you could
tell
> me how do do it.  The only way I found was to independently mount my
> classes dir and jar files on the "filesystem".
>
> Many thanks
>
> Steve Slatcher
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>