Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ant-dev] Bug 27540 Run Ant vs. Ant View

I ran into exactly the scenario 4) that Darin mentioned below and
it was indeed unhappy.

I was writing an Ant script from scratch that updates an Eclipse
update site and was using the AntView. The AntView is great
for such a task since I can develop one target at the time and
then easily run it (btw automatic reconciling
the targets as I edit would be nice, but this requires Ant
editing support - more on this below...). One of the targets updates
the workspace and I wanted to leverage the launch config's
refresh support but there was no way to do so when using the
Ant View. This was highly confusing.

Support for more than one config per script is nice, but it is
also a more advanced feature. It should not
make the common scenario where I just want
to run a script with some config settings.
more difficult. One idea for handling multiple launch configs
would be to add support for tagging one launch config
as the default launch config for a script. This launch config
would be used when running from the AntView.

<<<Side note: I wasn't writing an Ant script from scratch since a long time
and
it wasn't a happy experience. We should really have some Ant editing
support in Eclipse. Now there is Planty, but since it isn't CPL I couldn't
try it
out. Getting Planty as an Eclipse contribution would be really nice...
If Planty isn't contributed to Eclipse then we should try hard to
implement some basic Ant editing support from scratch>>>

--erich



                                                                                                                                   
                      "Jed Anderson"                                                                                               
                      <Jed_Anderson@xxxxxxx>          To:      platform-ant-dev@xxxxxxxxxxx                                        
                      Sent by:                        cc:                                                                          
                      platform-ant-dev-admin@         Subject: Re: [platform-ant-dev] Bug 27540 Run Ant vs. Ant View               
                      eclipse.org                                                                                                  
                                                                                                                                   
                                                                                                                                   
                      12/03/2002 09:40 PM                                                                                          
                      Please respond to                                                                                            
                      platform-ant-dev                                                                                             
                                                                                                                                   




I have a use case that might shed some light on the situation.

I have written two Ant scripts that I use very frequently.  One installs a
new Eclipse, and one updates a installed Eclipse with new plugins.  Both of
these scripts prompt the user to enter data (build #, stream, file
locations, etc).  Most of the time when I run these scripts I want to
install the latest 2.1 build from our local build library (we keep a copy
of each build that is made).  So, I have written .bat files to launch my
Ant scripts with most of the properties pre-assigned.  However, every now
and then I do go back and just fire one of these scripts up with no
pre-assigned properties, because I am doing something that is out of the
ordinary (installing another copy of an old build, or a second copy of the
latest build for testing, install a build from a different location, etc).

We are trying to mimic the above functionality with the launch
configurations & Ant support.  Anything less than what the command line
allows will be limiting to some subset of our users.  As far as I see there
are only two cases, which we have already identified:

A. Command line launch, ant -buildfile foo.xml myFavoriteTarget
B. From a script file (sh, .bat, etc)

So the question is, which of the below techniques applies/mimics/improves
on the above techniques.

#1 is a mix of A & B.  When there is no pre-existing launch configuration,
and when the user hasn't created or edited a launch configuration for the
script #1 acts like A.  But once a user has created a launch config it acts
like B.
#2 acts like B.
#3 acts like B.
#4 acts like A.  The fact that it runs with no feedback is just a bug.

I think we want to support both modes, but we should be clear about how
things work.

Here's how I would like to see things work.  I think this simplifies the
simple case, and unifies the expert user mode.

#1 should just run the default target (whether or not it creates a user
visible launch config... i'm still out to sea)
#2 should be another entry point to the mechanism described in #3
#3 should retain the current philosophy
#4 should retain the current philosophy

jkca



|---------+---------------------------------->
|         |           "Darin Wright"         |
|         |           <Darin_Wright@xxxxxxx> |
|         |           Sent by:               |
|         |           platform-ant-dev-admin@|
|         |           eclipse.org            |
|         |                                  |
|         |                                  |
|         |           12/03/2002 01:22 PM    |
|         |           Please respond to      |
|         |           platform-ant-dev       |
|         |                                  |
|---------+---------------------------------->
  >
---------------------------------------------------------------------------------------------------------|

  |
|
  |        To:      platform-ant-dev@xxxxxxxxxxx
|
  |        cc:
|
  |        Subject: [platform-ant-dev] Bug 27540 Run Ant vs. Ant View
|
  >
---------------------------------------------------------------------------------------------------------|





We are looking for public opinion in regards to bug 27450:

http://bugs.eclipse.org/bugs/show_bug.cgi?id=27540

The problem is this: We provide more than one way to run an Ant script
(which is a feature), but the user is left unsure of which way they should
run their script, and how the different ways of running scripts relate.

A user may run an ant script in each of the following ways:
(1) Using the "Run Ant" action from the navigator pop-up menu
(2) Using the "Run Ant..." action from the navigator pop-up menu
(3) Opening the external tools dialog, create an Ant Script launch
configuration, run it
(4) Using the Ant View

Here's what actually happens behind the scenes for each scenario:
(1) "Run Ant". If a launch configuration does not exist for the selected
ant script, a default launch configuration is created for the script,
saved, and run. The default script runs the default target in a background
thread. If a launch configuration already exists for the selected script,
it is run (with whatever settings are present). If more than one launch
configuration exists for the script, the user is asked to choose the launch
configuration to run.
(2) "Run Ant...". This is the same as number (1), except the launch dialog
is opened on the script before it is run. This allows the user to alter the
configuration before running it.
(3) Opening the External Tools dialog. Here, the user chooses an existing
script or creates a new script to run.
(4) Using the Ant View. When the user selects one or more targets to run
from the Ant View, a temporary launch configuration is created to run the
selected targets (and then discarded). However, the temporary launch
configuration is in no way related to any existing launch configurations
for the selected script. Thus,for example, if I have an existing launch
configuration for an ant script that has settings to run in the foreground
with special arguments (lets say, -verbose), and to refresh the workspace
when done, when I run a target from that script from the Ant view, it will
run in the background with no arguments, and no refresh.

I believe scenario (4) is misleading to the user. If they have configured a
script to run with certain settings, then running from the Ant View should
honor those settings.

Opinions?

Darin



_______________________________________________
platform-ant-dev mailing list
platform-ant-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ant-dev





Back to the top