Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » ECLIPSE_HOME should point to target platform
ECLIPSE_HOME should point to target platform [message #1727233] Mon, 21 March 2016 13:48 Go to next message
Tobias Pongs is currently offline Tobias PongsFriend
Messages: 9
Registered: July 2015
Junior Member
The java classpath variable ECLIPSE_HOME is defined to point to the target platform.

Due to bug 482197 the TargletContainer was changed to return the install location instead of the pool location.

Was it intended, that this change have that effect?

Best regards
Tobias
Re: ECLIPSE_HOME should point to target platform [message #1727270 is a reply to message #1727233] Mon, 21 March 2016 16:10 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 21.03.2016 um 14:48 schrieb Tobias Pongs:
> The java classpath variable ECLIPSE_HOME is defined to point to the target platform.
I always thought it always points to the host IDE's install location, but now I've checked the defining code in
org.eclipse.pde.internal.core.EclipseHomeInitializer and org.eclipse.pde.core.plugin.TargetPlatform.getLocation(). I
must say that I find the name "ECLIPSE_HOME" highly misleading. Maybe it's relict from pre-OSGi times.

But worse than the name is the implementation: If the first ITargetLocation has a non-null location, that location is
used for ECLIPSE_HOME. If there are no ITargetLocations or the first one has a null location, the host IDE's install
location is used. More than the first ITargetLocation is never checked for non-null locations.

With this complex definition the ECLIPSE_HOME variable does not seem very useful to me. How are you using it?

>
> Due to bug 482197 the TargletContainer was changed to return the install location instead of the pool location.
>
> Was it intended, that this change have that effect?
I guess so. Do you think that is a problem?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: ECLIPSE_HOME should point to target platform [message #1727309 is a reply to message #1727270] Tue, 22 March 2016 05:41 Go to previous messageGo to next message
Tobias Pongs is currently offline Tobias PongsFriend
Messages: 9
Registered: July 2015
Junior Member
Eike Stepper wrote on Mon, 21 March 2016 16:10

> The java classpath variable ECLIPSE_HOME is defined to point to the target platform.
I always thought it always points to the host IDE's install location, but now I've checked the defining code in
org.eclipse.pde.internal.core.EclipseHomeInitializer and org.eclipse.pde.core.plugin.TargetPlatform.getLocation(). I
must say that I find the name "ECLIPSE_HOME" highly misleading. Maybe it's relict from pre-OSGi times.

When I first used that variable, I was surprised, too.

Eike Stepper wrote on Mon, 21 March 2016 16:10

But worse than the name is the implementation: If the first ITargetLocation has a non-null location, that location is
used for ECLIPSE_HOME. If there are no ITargetLocations or the first one has a null location, the host IDE's install
location is used. More than the first ITargetLocation is never checked for non-null locations.

With this complex definition the ECLIPSE_HOME variable does not seem very useful to me. How are you using it?

I need a special annotation processor from the target platform. So I used this variable in the annotation processing factory path to point to the plugin in the target platform.

Eike Stepper wrote on Mon, 21 March 2016 16:10

>
> Due to bug 482197 the TargletContainer was changed to return the install location instead of the pool location.
>
> Was it intended, that this change have that effect?
I guess so. Do you think that is a problem?

Is there another way to get the path of a plugin out of the target platform?


Best regards
Tobias
Re: ECLIPSE_HOME should point to target platform [message #1727334 is a reply to message #1727309] Tue, 22 March 2016 08:44 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Tobias,

You could try to use one of the variables defined by the org.eclipse.oomph.targlets.core plugin:

<extension
point="org.eclipse.core.variables.dynamicVariables">
<variable
description="Targlet Container Profile ID"
name="targlet_container_profile_id"
resolver="org.eclipse.oomph.targlets.internal.core.variables.TargletContainerProfileID"
supportsArgument="true"/>
<variable
description="Targlet Container Profile File"
name="targlet_container_profile_file"
resolver="org.eclipse.oomph.targlets.internal.core.variables.TargletContainerProfileFile"
supportsArgument="true"/>
<variable
description="Targlet Container Profile Directory"
name="targlet_container_profile_directory"
resolver="org.eclipse.oomph.targlets.internal.core.variables.TargletContainerProfileDirectory"
supportsArgument="true"/>
<variable
description="Targlet Container Bundle Pool"
name="targlet_container_bundle_pool"
resolver="org.eclipse.oomph.targlets.internal.core.variables.TargletContainerBundlePool"
supportsArgument="true"/>
<variable
description="Targlet Container Classpath"
name="targlet_container_classpath"
resolver="org.eclipse.oomph.targlets.internal.core.variables.TargletContainerClasspath"
supportsArgument="true"/>
<variable
description="Targlet Container Classpath File"
name="targlet_container_classpath_file"
resolver="org.eclipse.oomph.targlets.internal.core.variables.TargletContainerClasspathFile"
supportsArgument="true"/>
</extension>

They all take the TargletContainerID as an argument.

And we provide the argument-free "target_platform_classpath_file" variable from the org.eclipse.oomph.util.pde plugin:

<extension
point="org.eclipse.core.variables.dynamicVariables">
<variable
description="Target Platform Classpath File"
name="target_platform_classpath_file"
resolver="org.eclipse.oomph.util.internal.pde.TargetPlatformClasspathFile"
supportsArgument="false"/>
</extension>

It produces a temp file with a classpath that represents the active target's contents.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: ECLIPSE_HOME should point to target platform [message #1727340 is a reply to message #1727309] Tue, 22 March 2016 09:39 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 22.03.2016 um 06:41 schrieb Tobias Pongs:
> Is there another way to get the path of a plugin out of the target platform?

I've just implemented two new dynamic variables:

490159: Provide target_platform_feature_location and target_platform_plugin_location variables
https://bugs.eclipse.org/bugs/show_bug.cgi?id=490159

A new milestone build (M6) will be available tomorrow.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: ECLIPSE_HOME should point to target platform [message #1727346 is a reply to message #1727334] Tue, 22 March 2016 10:59 Go to previous messageGo to next message
Tobias Pongs is currently offline Tobias PongsFriend
Messages: 9
Registered: July 2015
Junior Member
The problem with these variables is, that you cannot use them in the "annotation processing" -> "Factory path" settings. There you only could use the special CLASSPATH variables.

But thanks for the info. I will use the "target_platform_classpath_file" somehow.

Best regards
Tobias
Re: ECLIPSE_HOME should point to target platform [message #1727507 is a reply to message #1727346] Wed, 23 March 2016 12:08 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 22.03.2016 um 11:59 schrieb Tobias Pongs:
> The problem with these variables is, that you cannot use them in the "annotation processing" -> "Factory path"
> settings. There you only could use the special CLASSPATH variables.
>
> But thanks for the info. I will use the "target_platform_classpath_file" somehow.
I've implemented the classpath variable TARGET_PLATFORM_BUNDLE_POOL in the scope of this bug:

[490274] Provide TARGET_PLATFORM_BUNDLE_POOL classpath variable
https://bugs.eclipse.org/bugs/show_bug.cgi?id=490274

A new nightly build is running: https://hudson.eclipse.org/oomph/job/integration/2280/console

The wiki now offers download links for latest nightly builds: https://wiki.eclipse.org/Eclipse_Installer

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: ECLIPSE_HOME should point to target platform [message #1727589 is a reply to message #1727507] Thu, 24 March 2016 08:56 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 23.03.2016 um 13:08 schrieb Eike Stepper:
> The wiki now offers download links for latest nightly builds: https://wiki.eclipse.org/Eclipse_Installer
Because Neon M6 will be delayed til next Monday or Tuesday I'll respin our M6 today, so that the new classpath variable
will become part of it.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: ECLIPSE_HOME should point to target platform [message #1754103 is a reply to message #1727233] Tue, 14 February 2017 14:34 Go to previous messageGo to next message
Mathieu Debove is currently offline Mathieu DeboveFriend
Messages: 1
Registered: February 2017
Junior Member
Hello Eike,

I'm very interested in these variables but I cannot figure out how to use them.

Can you please provide a little example of how to use them ?

Thanks in advance

Mathieu
Re: ECLIPSE_HOME should point to target platform [message #1754145 is a reply to message #1754103] Tue, 14 February 2017 17:30 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
When modifying a launch configuration, any place the dialog shows Variables... the "Select Variable" dialog will have various targlet_* variables you can use. The message isn't very descriptive about what the argument should be though. Which specific thing(s) are you interested in using?

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Conflicting Dependency
Next Topic:Very slow git clone performance
Goto Forum:
  


Current Time: Tue Apr 23 18:02:42 GMT 2024

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

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

Back to the top