Bug 24718 - Run Ant should be programmatically available
Summary: Run Ant should be programmatically available
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Darin Swanson CLA
QA Contact:
URL:
Whiteboard:
Keywords: core, ui
Depends on:
Blocks:
 
Reported: 2002-10-11 15:43 EDT by Dejan Glozic CLA
Modified: 2002-11-15 14:18 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dejan Glozic CLA 2002-10-11 15:43:48 EDT
PDE UI has a usability problem when it comes to building plug-ins and features. 
All the scripts can be generated programmatically but running them requires UI-
based 'Run Ant' wizard. From the PDE point of view, this wizard is too low-
level. A more user-friendly wizard provided by PDE would be better.

For this to work, we need to be able to run Ant scripts programmatically - 
without the mentioned wizard. We need to be able to select tasks and set 
properties programmatically, as well as get the runnable we can run in our 
wizard. 

Therefore, we need a class that can accept a file path (we want
to be able to run the build.xml file created outside the workspace),
can allow us to select tasks to run and also allows us to set properties.
In short we should be able to configure it in the analogous way a user
can configure the RunAntWizard. The class would not have a 'run' method - 
instead, it would have 'getOperation()' that returns IRunnableWithProgress
that we can call from our wizard. The class can launch Ant Console 
(if configured to do so) but must do it ansynchronously because it will
be executed on a non-GUI thread.
Comment 1 Rodrigo Peretti CLA 2002-10-11 15:53:35 EDT
Take a look at the AntRunner class on ant.core. You can set the build.xml, 
targets, progress monitor, etc... A lot of the required functionality 
(embedded in the buildfile) was included for the 2.0 release when we first 
talked about it (relative to where intermediate files like the compile log 
should be put, ability to set a different temp folder, etc...).

About the console I'm not completely sure but it should only be a matter of 
using the right class using the parameter -logger=className. This class might 
already be contributed by external tools. You can talk to Darin Swanson or 
Jared Burns about it. Probably a better place is the ant-core mailing list.
Comment 2 Dejan Glozic CLA 2002-10-11 16:04:03 EDT
The implementation of AntLaunchWizard uses ExternalTool support which is all 
internal. AntRunner is probably used somewhere in the chain, but we would like 
to leverage as much of the external tool support as possible.
Comment 3 Rodrigo Peretti CLA 2002-10-11 16:07:32 EDT
Moving to Platform Ant (Step 1).
Comment 4 Rodrigo Peretti CLA 2002-10-11 16:07:55 EDT
Moving to Platform Ant (Step 2/2).
Comment 5 Darin Swanson CLA 2002-10-11 17:21:13 EDT
I will take a look at this on Monday while you are all enjoying the turkey.
Comment 6 Darin Wright CLA 2002-11-15 14:18:39 EST
This should be fixed with the use of launch configs. You can programmatically 
create and launch configs. Note that the attributes of Ant configs will be 
evolving until M4.

marking as fixed
Comment 7 Darin Wright CLA 2002-11-15 14:18:51 EST
Verified.