Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-update-dev] Available classes from install handlers


I am a bit surprised that the runtime classes are not available. I wonder if some of the classes are from the runtime compatibility layer, which update core no longer depends on (so it does not expose to handlers)
I'd suggest using org.eclipse.core.runtime.Platform.getInstallLocation(), but your solutions should work as well.

-Dorian



"Brad Jarvinen" <brad.jarvinen@xxxxxxxxxxxxxx>
Sent by: platform-update-dev-admin@xxxxxxxxxxx

11/24/2004 05:03 PM

Please respond to
platform-update-dev

To
<platform-update-dev@xxxxxxxxxxx>
cc
Subject
Re: [platform-update-dev] Available classes from install handlers





Actually for my particular case I've found out it's not a bug.  You
mentioned that all classes available to org.eclipse.update.core are
loaded, so I endeavored to find out which classes those are.  By looking
in its plugin.xml, I discovered the 3.0-added package of
org.eclipse.update.configurator and the class of ConfiguratorUtils which
conveniently has a static method getInstallURL().  So in my case it's a
matter of updating my InstallHandler to use that new class and method
instead of using the classes
org.eclipse.core.runtime.adaptor.LocationManager or
org.eclipse.core.boot.BootLoader.

Thanks,
Brad

-----------------------------------------------------------------------------------------------------


From: Dorian Birsan <birsan@xxxxxxxxxx>
Date: Tue, 23 Nov 2004 16:18:25 -0500
Delivered-to: platform-update-dev@xxxxxxxxxxx



In 2.x the install handlers packaged along with the features were loaded
by a class loader parented by the org.eclipse.update.core plugin class
loader, so they had access to all the classes available to
org.eclipse.update.core (and that included the runtime plugin).
In 3.0.x this is still true, so what you are seeing is behavior likely
caused by the move to osgi. Please open a bug.

The change to allow access to org.eclipse.ui is only in the 3.1 stream,
and it involves a class loader parent that combines both the
org.eclipse.update.core and org.eclipse.ui plugin class loaders
(provided org.eclipse.ui is installed and active, otherwise it is only
update.core).

-Dorian



"Brad Jarvinen" <Brad.Jarvinen@xxxxxxxxxxxxxx>
Sent by: platform-update-dev-admin@xxxxxxxxxxx
11/23/2004 02:28 PM
Please respond to
platform-update-dev

To<platform-update-dev@xxxxxxxxxxx>
cc
Subject[platform-update-dev] Available classes from install handlers







Is org.eclipse.core.runtime.* packages available from an Install Handler
in Eclipse 3.x?

It seems that it is not available any longer - I had an install handler
in Eclipse 2.x that accessed
org.eclipse.core.runtime.adaptor.LocationManager successfully but now in
3.0.1 I get a NoClassDefFoundError.

I saw a previous email stating that org.eclipse.update.core and
.org.eclipse.ui are the only class packages available and I want to
confirm that.

I'm trying to get access to the Eclipse root directory (by either
org.eclipse.core.boot.BootLoader.getInstallURL() or
LocationManager.getInstallLocation().getURL()) since my custom install
handler code needs to know the root Eclipse install directory currently.


Thanks,
Brad



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


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


Back to the top