Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Get shortcut to run my Ant target
Get shortcut to run my Ant target [message #119405] Wed, 23 November 2005 21:12 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 143
Registered: July 2009
Senior Member
Presently, since I'd really like to rely on my build script to build the
application, I build it by selecting the build.xml file, right-clicking on
the target I want and navigating to the next submenu to find the "Ant
Build" menu item. There has to be an easier way to do this. What choices
do I have?
Re: Get shortcut to run my Ant target [message #119420 is a reply to message #119405] Wed, 23 November 2005 21:53 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
You could assign a Key short cut to "Run Last Launched External Tool" using
the General>Keys>Modify preference page
The command is in the Run/Debug category.

Or you can just click on the External Tools drop down in the window toolbar
(the icon with the green play button and the toolbox). This will run the
last launched external tool.

Also, Run Ant Build is defined, by default to the "big-handed" Alt+Shift+X,
Q (ouch!). You can redefine the key sequences using the same pref page as
above.

HTH
Darins

"David Karr" <david.karr@wamu.net> wrote in message
news:3e16d503965ac0b9aa27739ffd20e4a5$1@www.eclipse.org...
> Presently, since I'd really like to rely on my build script to build the
> application, I build it by selecting the build.xml file, right-clicking on
> the target I want and navigating to the next submenu to find the "Ant
> Build" menu item. There has to be an easier way to do this. What choices
> do I have?
>
Re: Get shortcut to run my Ant target [message #119433 is a reply to message #119420] Wed, 23 November 2005 23:00 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 143
Registered: July 2009
Senior Member
Darin Swanson wrote:

> You could assign a Key short cut to "Run Last Launched External Tool" using
> the General>Keys>Modify preference page
> The command is in the Run/Debug category.

Actually, there is a "Run Last Launched", but this appears to want to run
a Java application. It doesn't seem to care that I just ran an Ant target.

> Or you can just click on the External Tools drop down in the window toolbar
> (the icon with the green play button and the toolbox). This will run the
> last launched external tool.

> Also, Run Ant Build is defined, by default to the "big-handed" Alt+Shift+X,
> Q (ouch!). You can redefine the key sequences using the same pref page as
> above.

None of these options allows me to build a shortcut to run a specific Ant
target. These only allow me to run "ant", with no target.

The only sort-of shortcut is to first click on the build.xml so the
Outline view shows the targets, then click on the target I want, and then
press alt-shift-X, Q. Another case where I can get it done faster in
Emacs :) .

> "David Karr" <david.karr@wamu.net> wrote in message
> news:3e16d503965ac0b9aa27739ffd20e4a5$1@www.eclipse.org...
>> Presently, since I'd really like to rely on my build script to build the
>> application, I build it by selecting the build.xml file, right-clicking on
>> the target I want and navigating to the next submenu to find the "Ant
>> Build" menu item. There has to be an easier way to do this. What choices
>> do I have?
Re: Get shortcut to run my Ant target [message #119459 is a reply to message #119433] Thu, 24 November 2005 00:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mebadran.gmail.com

David Karr wrote:
> Darin Swanson wrote:
>
>> You could assign a Key short cut to "Run Last Launched External Tool"
>> using
>> the General>Keys>Modify preference page
>> The command is in the Run/Debug category.
>
> Actually, there is a "Run Last Launched", but this appears to want to
> run a Java application. It doesn't seem to care that I just ran an Ant
> target.
>
>> Or you can just click on the External Tools drop down in the window
>> toolbar
>> (the icon with the green play button and the toolbox). This will run the
>> last launched external tool.
>
>> Also, Run Ant Build is defined, by default to the "big-handed"
>> Alt+Shift+X,
>> Q (ouch!). You can redefine the key sequences using the same pref page as
>> above.
>
> None of these options allows me to build a shortcut to run a specific
> Ant target. These only allow me to run "ant", with no target.
>
> The only sort-of shortcut is to first click on the build.xml so the
> Outline view shows the targets, then click on the target I want, and
> then press alt-shift-X, Q. Another case where I can get it done faster
> in Emacs :) .

You need to first set up the specific ant target you're after as an
"External Tool", after which you will be able to run it ("Run Ant
Build"), and, finally, "Run Last Launched External Tool".

Thanks for that key tip Darin. Alt+Shift+X, Q; arrowing down to the Ant
build you want to run; Enter, is a real pain after a while.

Regards,
Mohammed
Re: Get shortcut to run my Ant target [message #119604 is a reply to message #119459] Thu, 24 November 2005 17:53 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 143
Registered: July 2009
Senior Member
Mohammed Badran wrote:

> David Karr wrote:
>
>> Darin Swanson wrote:
>>
>>> You could assign a Key short cut to "Run Last Launched External Tool"
>>> using
>>> the General>Keys>Modify preference page
>>> The command is in the Run/Debug category.
>>
>> Actually, there is a "Run Last Launched", but this appears to want to
>> run a Java application. It doesn't seem to care that I just ran an
>> Ant target.
>>
>>> Or you can just click on the External Tools drop down in the window
>>> toolbar
>>> (the icon with the green play button and the toolbox). This will run the
>>> last launched external tool.
>>
>>> Also, Run Ant Build is defined, by default to the "big-handed"
>>> Alt+Shift+X,
>>> Q (ouch!). You can redefine the key sequences using the same pref
>>> page as
>>> above.
>>
>> None of these options allows me to build a shortcut to run a specific
>> Ant target. These only allow me to run "ant", with no target.
>>
>> The only sort-of shortcut is to first click on the build.xml so the
>> Outline view shows the targets, then click on the target I want, and
>> then press alt-shift-X, Q. Another case where I can get it done
>> faster in Emacs :) .
>
> You need to first set up the specific ant target you're after as an
> "External Tool", after which you will be able to run it ("Run Ant
> Build"), and, finally, "Run Last Launched External Tool".

Ok, I may have figured out how to set an Ant target as an external tool,
but I'm not sure. In the External Tools configuration dialog, on the
Common tab, I clicked the checkbox on "External Tools" in the "Display
in Favorites Menu" box. That's the only thing I could find that comes
close to "set up a specific Ant target as an external tool". However,
after that point, I still don't see how to do this. I can see it now in
the external tools menu, but there still is no magical "Run last
launched external tool" command that I can find.

How do you set up a specific Ant target as an external tool? I've
googled for this, and I can't see how to do this.
Re: Get shortcut to run my Ant target [message #119632 is a reply to message #119604] Thu, 24 November 2005 22:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mebadran.gmail.com

David Karr wrote:
> I can see it now in the external tools menu

Can you run it from there? If it doesn't run, then you have not set it
up correctly. Highlight Ant Build, then click New, browse for the ant
build file, select the specific target in the Targets tab, and that
should be all.

> but there still is no magical "Run last
> launched external tool" command that I can find.

Yes, there's none. You need to bind it to a key shortcut, as per Darin's
tip:

> You could assign a Key short cut to "Run Last Launched External Tool" using
> the General>Keys>Modify preference page
> The command is in the Run/Debug category.
>
> Or you can just click on the External Tools drop down in the window toolbar
> (the icon with the green play button and the toolbox). This will run the
> last launched external tool.
>
> Also, Run Ant Build is defined, by default to the "big-handed" Alt+Shift+X,
> Q (ouch!). You can redefine the key sequences using the same pref page as
> above.

Regards,
Mohammed
Re: Get shortcut to run my Ant target [message #119782 is a reply to message #119405] Fri, 25 November 2005 20:32 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse3.rizzoweb.com

David Karr wrote:
> Presently, since I'd really like to rely on my build script to build the
> application, I build it by selecting the build.xml file, right-clicking
> on the target I want and navigating to the next submenu to find the "Ant
> Build" menu item. There has to be an easier way to do this. What
> choices do I have?
>

Have you used the Ant view? What I do is make Ant view a Fast View (so I
can be one-click away from it at any time) and then launch my favorite
Ant targets from there. That way I'm always just a single click + a
double click away from running any Ant target.

HTH,
Eric
Previous Topic:Added Problem marker, but doesnt immediately refresh in my editor
Next Topic:how to know if JRE is installed on linux
Goto Forum:
  


Current Time: Sat Nov 09 02:40:12 GMT 2024

Powered by FUDForum. Page generated in 0.07781 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top