Skip to main content



      Home
Home » Eclipse Projects » Oomph » Access to ${target_home} in Oomph setup
Access to ${target_home} in Oomph setup [message #1774772] Thu, 19 October 2017 09:51 Go to next message
Eclipse UserFriend
Hi everyone,

in our Eclipse N4JS https://github.com/eclipse/n4js, we would like to configure the default product in the Run Configuration -> Program to Run -> "Run a product".

In the subsection "Program to Run" in Eclipse documentation https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Flaunchers%2Feclipse_main.htm it says
Quote:

The Program to Run section is where you specify the product or application to test.

The product combo box is populated with the IDs of all products (org.eclipse.core.runtime.products extensions) defined in the workspace and target plug-ins. The product ID that is initially selected is the default product as specified by the eclipse.product key in the config.ini file that is located in the ${target_home}/configuration directory. The ${target_home} variable refers to the location of the target platform as specified on the Windows > Preferences... > Plug-in Development > Target Platform preference page . In the Eclipse SDK, the default product ID is org.eclipse.sdk.ide.



I tried to create a config.ini file in the Oomph setup file, but the variable ${target_home} is not available.

Does anyone have any hints?

Thanks!

PS: In my test case, the value of ${target_home} of a running Eclipse instance is:
/Users/quang.tran/oomph/TESTN4JS/ws/.metadata/.plugins/org.eclipse.pde.core/.install_folders/1508414124544

[Updated on: Thu, 19 October 2017 10:06] by Moderator

Re: Access to ${target_home} in Oomph setup [message #1774789 is a reply to message #1774772] Thu, 19 October 2017 11:27 Go to previous messageGo to next message
Eclipse UserFriend
I'm not sure I completely follow. What are you trying to accomplish exactly? What are you trying to set in the config.ini? A launch configuration can be located in one of your projects and can be committed to git, fully configured...
Re: Access to ${target_home} in Oomph setup [message #1774824 is a reply to message #1774789] Fri, 20 October 2017 02:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,

Thanks a lot for your reply. I have visualized what I want to achieve in the screenshot http://ibb.co/k4ZAD6

Right now, whenever we create a new Junit Plugin Test run configuration, the product ID chosen in the combobox Run a Product is org.eclipse.platform.ide. I would like this to be automatically set to org.eclipse.n4js.product.product.

In order to do this, according to the Eclipse documentation I mentioned in my previous post, we have to put the following entry
eclipse.product=org.eclipse.n4js.product.product


into a config.ini file and this file must be located in ${target_home}/configuration folder.

[Updated on: Fri, 20 October 2017 03:17] by Moderator

Re: Access to ${target_home} in Oomph setup [message #1774839 is a reply to message #1774824] Fri, 20 October 2017 08:36 Go to previous messageGo to next message
Eclipse UserFriend
These variables they refer to in the documentation are substitution variables that you can use, for example, in launch configurations themselves. If PDE doesn't directly populate an system/environment variable with this location, then there is nothing I know of that makes that location information available directly in the running IDE for use in a setup.
Re: Access to ${target_home} in Oomph setup [message #1774841 is a reply to message #1774839] Fri, 20 October 2017 08:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,

yeah, that's the problem. I have ended up with the hack where I create a launch task in Oomph that executes the a run configuration. The run configuration is associated with a Java class and the variable ${target_home} is passed as argument so that I can access it inside the main method of the Java class in order to know where to put the config.ini file.
Re: Access to ${target_home} in Oomph setup [message #1774843 is a reply to message #1774841] Fri, 20 October 2017 09:08 Go to previous messageGo to next message
Eclipse UserFriend
And in order to do that, I need to execute a build task (ProjectsBuild) first. The problem is, the build task is executed again and again when we restart the IDE. Is there anyway to tell Oomph to execute the build task once for the first oomph only ?
Re: Access to ${target_home} in Oomph setup [message #1774849 is a reply to message #1774843] Fri, 20 October 2017 10:00 Go to previous messageGo to next message
Eclipse UserFriend
Does the "Only New Projects" flag set to true help?
Re: Access to ${target_home} in Oomph setup [message #1774852 is a reply to message #1774849] Fri, 20 October 2017 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Ed, cool to hear it would be possible! What is the exact name of the flag?
Re: Access to ${target_home} in Oomph setup [message #1774854 is a reply to message #1774852] Fri, 20 October 2017 10:32 Go to previous message
Eclipse UserFriend
Please ignore my latest comment, I can see all properties in the properties view.
Previous Topic:How to install locally Eclipse Oomph?
Next Topic:JRETask setting jreExternalAnns property?
Goto Forum:
  


Current Time: Sun Jul 13 09:02:12 EDT 2025

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

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

Back to the top