Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Installation location from BaseInstallHandler
Installation location from BaseInstallHandler [message #144161] Tue, 14 October 2003 18:39 Go to next message
Eclipse UserFriend
I am writing a custom InstallHandler (that extends BaseInstallHandler) for
a feature. In the completeInstall() method, I need to determine the
installation location for the plugins, so I can perform some operations on
the newly installed files. Is there any way to do this using the update
API?

(I used to do this using

Platform.getPlugin("org.eclipse.update.core").find(new Path("."));

and then going up a level to find the plugins directory, but this doesn't
work in general, since Eclipse extension plugins may be installed in a
separate directory)
Re: Installation location from BaseInstallHandler [message #144214 is a reply to message #144161] Tue, 14 October 2003 21:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dorian.birsan.net

"Roberto Scaramuzzi" <birdo@parasoft.com> wrote in message
news:bmhtv0$lvf$1@eclipse.org...
> I am writing a custom InstallHandler (that extends BaseInstallHandler) for
> a feature. In the completeInstall() method, I need to determine the
> installation location for the plugins, so I can perform some operations on
> the newly installed files. Is there any way to do this using the update
> API?

Update uses some sort of provider/consumer pattern for manipulating feature
contents. In particular, the feature provider has a getURL() method that you
can use to get info about the actual feature location. Plugins are located
in ../plugins relative to the feature.

When InstallHandler.initialize() is called keep track of the feature and
plugin entries objects passed to it, and when needed, just use the
feature.getFeatureContentProvider().getURL()

(I hope I got this right :-)

-Dorian


>
> (I used to do this using
>
> Platform.getPlugin("org.eclipse.update.core").find(new Path("."));
>
> and then going up a level to find the plugins directory, but this doesn't
> work in general, since Eclipse extension plugins may be installed in a
> separate directory)
>
Re: Installation location from BaseInstallHandler [message #144639 is a reply to message #144214] Wed, 15 October 2003 17:35 Go to previous messageGo to next message
Eclipse UserFriend
dorian birsan wrote:

> "Roberto Scaramuzzi" <birdo@parasoft.com> wrote in message
> news:bmhtv0$lvf$1@eclipse.org...
> > I am writing a custom InstallHandler (that extends BaseInstallHandler) for
> > a feature. In the completeInstall() method, I need to determine the
> > installation location for the plugins, so I can perform some operations on
> > the newly installed files. Is there any way to do this using the update
> > API?


> When InstallHandler.initialize() is called keep track of the feature and
> plugin entries objects passed to it, and when needed, just use the
> feature.getFeatureContentProvider().getURL()

> (I hope I got this right :-)

> -Dorian


I'm sorry to say feature.getFeatureContentProvider().getURL() points to
the location of the feature on the update site, not at the newly installed
file.


(and IFeatureContentConsumer does not have a getURL() method.)
Re: Installation location from BaseInstallHandler [message #144736 is a reply to message #144639] Wed, 15 October 2003 23:12 Go to previous message
Eclipse UserFriend
Originally posted by: dorian.birsan.net

"Roberto Scaramuzzi" <birdo@parasoft.com> wrote in message
news:bmkeji$6cf$1@eclipse.org...
> dorian birsan wrote:
>
> > "Roberto Scaramuzzi" <birdo@parasoft.com> wrote in message
> > news:bmhtv0$lvf$1@eclipse.org...
> > > I am writing a custom InstallHandler (that extends BaseInstallHandler)
for
> > > a feature. In the completeInstall() method, I need to determine the
> > > installation location for the plugins, so I can perform some
operations on
> > > the newly installed files. Is there any way to do this using the
update
> > > API?
>

>
> > When InstallHandler.initialize() is called keep track of the feature and
> > plugin entries objects passed to it, and when needed, just use the
> > feature.getFeatureContentProvider().getURL()
>
> > (I hope I got this right :-)

It looks like I mixed things up a bit :-)
I'd say take a look at DeltaInstallHandler, which is used to install partial
plug-ins by first installing the partial plugin and then copies the
remaining files from the old version of the plugin.

>
> > -Dorian
>
>
> I'm sorry to say feature.getFeatureContentProvider().getURL() points to
> the location of the feature on the update site, not at the newly installed
> file.
>
>
> (and IFeatureContentConsumer does not have a getURL() method.)
>
Previous Topic:eclipse 2.1.1 an d win 95
Next Topic:How to properly use CVS/Branching in large development effort w/many projectes and developers
Goto Forum:
  


Current Time: Thu Jul 17 19:38:41 EDT 2025

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

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

Back to the top