Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » read preferences of eclipse-ide(I want to read the path of workspace)
read preferences of eclipse-ide [message #755695] Wed, 09 November 2011 10:38 Go to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
Is it possible to read the path to the workspace in mwe2 file.
At work I am working on windows, private on a Mac.
I have the following problem in the mwe2-file

module org.demo02.GenWorkflow
	//Windows
	var  workspacePath = "C:/eclipse/ws/e3.7-redVodoo/demo"
	//Apple
	//var  workspacePath = "/Users/alle/eclipse/ws/redVoodo/demo/"
	var  runtimeProject = "org.demo02"
	var  modelFolder = "model"
	var  modelPath = "${workspacePath}/${runtimeProject}/${modelFolder}"


I am using Mercurial
The problem is, that I must everytime edit after Checkout/Pull
Windows: var workspacePath = "C:/eclipse/ws/e3.7-redVodoo/demo"
Mac: var workspacePath = "/Users/alle/eclipse/ws/redVoodo/demo/"

My Question: Is there a way to read the Path to the workspace?

Re: read preferences of eclipse-ide [message #755709 is a reply to message #755695] Wed, 09 November 2011 11:07 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 722
Registered: July 2009
Location: Dortmund, Germany
Senior Member

You could to this by defining the workspacePath variable unbound and pass it through the launch config:

module org.demo02.GenWorkflow
	var  workspacePath


Then open Run/Run Configurations / Mwe2 Launch, select your run config and go to the arguments tab.
There add
 -pwoworkspacePath=${workspace_loc}

to the Program arguments.

This should do the trick.

~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Not working [message #755735 is a reply to message #755709] Wed, 09 November 2011 12:22 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
I have added the argument
-pworkspacePath=${workspace_loc}

I have added it exactly how I have written it above.

I get the following error:
Problems running workflow org.demo02.GenWorkflow: Unsupported path :
C:\eclipse\ws\e3.7-redVodoo/org.demo02/model
(only folders and archives are supported).

The correct Path to Workspace in Windows is: C:\eclipse\ws\e3.7-redVodoo

Re: Not working [message #755751 is a reply to message #755735] Wed, 09 November 2011 13:32 Go to previous messageGo to next message
Ingo Meyer is currently offline Ingo MeyerFriend
Messages: 162
Registered: July 2009
Senior Member
Just an idea: try to use "/" as the path separator
How you mean it [message #755752 is a reply to message #755751] Wed, 09 November 2011 13:36 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
How you mean it.
Where must i make this settings to "/"
Re: How you mean it [message #755782 is a reply to message #755752] Wed, 09 November 2011 15:12 Go to previous messageGo to next message
Ingo Meyer is currently offline Ingo MeyerFriend
Messages: 162
Registered: July 2009
Senior Member
I mean make all slash and not backslash: "C:/eclipse/ws/e3.7-redVodoo/org.demo02/model"
Thanks [message #755912 is a reply to message #755782] Thu, 10 November 2011 07:48 Go to previous message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
Thanks for your help.
But it is not working.
I think that it is not possible.
Previous Topic:compilation warnings MyPackage.Literals interface
Next Topic:[xtend2] instancefactory
Goto Forum:
  


Current Time: Wed Apr 01 21:19:18 GMT 2020

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

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

Back to the top