Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-update-dev] Running install handlers separately

There is no easy way to do an explicit call that would cause all you
install handlers to run. Following are the options I see:

* install handlers are run as part of the feature "lifecycle" operations.
So if you use a native installer to lay down your features, next time you
start, Eclipse runs reconciliation, this should cause your fetaures to be
detected and configured (automatically, or as a result of user accepting
pending changes). The "configure" operation should trigger call to the
install handlers, you could do the work then.

* write a headless app that explicitly calls your install handlers and
invoke it from your installer. I have not actually tried to do this, but
looking at the API it should be possible (although you'll need to create
instances of some of the descriptor objects). Since the install handler
jars are in the feature directory, you'd need to play class loading games.
Would need to create class loaders for each handler that has the handler
.jar on its load path and is parented by a plugin loader (your headless
app) that prereqs org.eclipse.update.core. Load the handler class and call
the methods you need (I am assuming the "install" methods of the handler).
Take a look at org.eclipse.update.internal.core.InstallHandlerProxy ...
this is where we do it (getLocalHandler() method).

* write a plugin that has a copy of your install handler jars, include it
as part of your product, and write a headless app that call it. The plugin
needs to prereq org.eclipse.update.core. This is the same as the previous
approach, but you don't have to play loader games (but have extra plugin
and copy of jars).

Hope you can make one of these work.

What you are pointing out is that for native installers there should be a
way of triggering the "install" lifecycle calls (the install was native and
the features did not get a chance to participate). We should revisit this
in 2.1 (possibly as part of the exposed API).



                                                                                                                                                
                      "Tim Koss"                                                                                                                
                      <Tim_Koss@xxxxxxx>                To:       platform-update-dev@xxxxxxxxxxx                                               
                      Sent by:                          cc:                                                                                     
                      platform-update-dev-admin@        Subject:  [platform-update-dev] Running install handlers separately                     
                      eclipse.org                                                                                                               
                                                                                                                                                
                                                                                                                                                
                      07/18/2002 06:25 PM                                                                                                       
                      Please respond to                                                                                                         
                      platform-update-dev                                                                                                       
                                                                                                                                                
                                                                                                                                                



Vlad;

As you remember from our earlier discussions WSDD had wanted the ability to
run Eclipse headless to install all the features that make up our base
install. Since the API's are not cleaned up yet, you and I decided that we
would not do this in this release. We are able to automate our builds to
get the features and plugins from cvs and lay them all down properly. The
problem that we have is that a lot of these features have install handlers
that do nontrivial work. What we would like to do is a the end of our
install, just run all the handlers (they will all have been laid down as
part of the install). Is there a simple way for us to just call Eclipse and
do this?

Tim

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





Back to the top