Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:51 Go to next message
Minh Quang Tran is currently offline Minh Quang TranFriend
Messages: 19
Registered: September 2017
Junior Member
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 14:06]

Report message to a moderator

Re: Access to ${target_home} in Oomph setup [message #1774789 is a reply to message #1774772] Thu, 19 October 2017 15:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29650
Registered: July 2009
Senior Member
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 06:53 Go to previous messageGo to next message
Minh Quang Tran is currently offline Minh Quang TranFriend
Messages: 19
Registered: September 2017
Junior Member
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 07:17]

Report message to a moderator

Re: Access to ${target_home} in Oomph setup [message #1774839 is a reply to message #1774824] Fri, 20 October 2017 12:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29650
Registered: July 2009
Senior Member
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 12:54 Go to previous messageGo to next message
Minh Quang Tran is currently offline Minh Quang TranFriend
Messages: 19
Registered: September 2017
Junior Member
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 13:08 Go to previous messageGo to next message
Minh Quang Tran is currently offline Minh Quang TranFriend
Messages: 19
Registered: September 2017
Junior Member
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 14:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29650
Registered: July 2009
Senior Member
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 14:14 Go to previous messageGo to next message
Minh Quang Tran is currently offline Minh Quang TranFriend
Messages: 19
Registered: September 2017
Junior Member
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 14:32 Go to previous message
Minh Quang Tran is currently offline Minh Quang TranFriend
Messages: 19
Registered: September 2017
Junior Member
Please ignore my latest comment, I can see all properties in the properties view.
Previous Topic:How to exclude folders on project import
Next Topic:JRETask setting jreExternalAnns property?
Goto Forum:
  


Current Time: Thu Nov 15 04:30:17 GMT 2018

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

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

Back to the top