Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » platform:/resource when projects sit outside the workspace?
platform:/resource when projects sit outside the workspace? [message #1139331] Tue, 15 October 2013 17:56 Go to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1827
Registered: July 2009
Senior Member
I have some DSL projects that are hosted in SVN so these projects are checked out directly into the workspace. Other projects live in Git so the meat of the projects sits below $HOME/.git (import projects only links to that location).

One of the git projects depends on the genmodel of on of the svn projects. Previously, I first installed the svn project into the hosting Eclipse and using platform:/resource I could successfully refer to the genmodel etc.

Today I tried to create one big workspace with all projects included and it seems that the platform:/resources URIs break (aside from the issue whether or not to include the source-folder in the path). Is this scheme assuming that all projects live in the same parent folder?

thanks,
Stephan
Re: platform:/resource when projects sit outside the workspace? [message #1139348 is a reply to message #1139331] Tue, 15 October 2013 18:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13493
Registered: July 2009
Senior Member
Hi yes standlonesetup.setplatformuri assumes that. Maybe you can
build one / change it to be more flexible

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: platform:/resource when projects sit outside the workspace? [message #1139369 is a reply to message #1139331] Tue, 15 October 2013 18:31 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6772
Registered: July 2009
Senior Member
Hi Stephan

If you're running within Eclipse, platform:/resource should just work.

If you're running standalone, it is your responsibility to initialize
the EcorePlugin mappings. As of Kepler the ExtensionProcessor nested
class will search the classpath for the information. If you need more
control you can look at
org.eclipse.ocl.examples.domain.utilities.ProjectMap.

Regards

Ed Willink

On 15/10/2013 18:56, Stephan Herrmann wrote:
> I have some DSL projects that are hosted in SVN so these projects are
> checked out directly into the workspace. Other projects live in Git so
> the meat of the projects sits below $HOME/.git (import projects only
> links to that location).
>
> One of the git projects depends on the genmodel of on of the svn
> projects. Previously, I first installed the svn project into the
> hosting Eclipse and using platform:/resource I could successfully
> refer to the genmodel etc.
>
> Today I tried to create one big workspace with all projects included
> and it seems that the platform:/resources URIs break (aside from the
> issue whether or not to include the source-folder in the path). Is
> this scheme assuming that all projects live in the same parent folder?
>
> thanks,
> Stephan
Re: platform:/resource when projects sit outside the workspace? [message #1139383 is a reply to message #1139369] Tue, 15 October 2013 18:45 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1827
Registered: July 2009
Senior Member
Thanks Christian and Ed,

at this point I'm content to know *why* this setup doesn't work. It's not my regular working environment, just for presentation at ECE and thus I'm fine with some extra ProjectMapping entries (not-portable, so never to be committed).

BTW: I should've mentioned that the problem occurred when invoking an .mwe2, so yes: standalone mode.

thanks,
Stephan
Re: platform:/resource when projects sit outside the workspace? [message #1139438 is a reply to message #1139383] Tue, 15 October 2013 19:29 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6772
Registered: July 2009
Senior Member
Hi

In MWE

bean = ResourceSetImpl : resourceSet {}
bean = StandaloneSetup { resourceSet = resourceSet
platformUri = ".."
scanClassPath = true
}

should fix up platform:/resource

Regards

Ed Willink


On 15/10/2013 19:45, Stephan Herrmann wrote:
> Thanks Christian and Ed,
>
> at this point I'm content to know *why* this setup doesn't work. It's
> not my regular working environment, just for presentation at ECE and
> thus I'm fine with some extra ProjectMapping entries (not-portable, so
> never to be committed).
>
> BTW: I should've mentioned that the problem occurred when invoking an
> .mwe2, so yes: standalone mode.
>
> thanks,
> Stephan
>
Previous Topic:Appending notifiyObservers call to a XBlockExpression using jvmInferrer
Next Topic:problem with xtext and antlr
Goto Forum:
  


Current Time: Sun Jul 12 14:16:14 GMT 2020

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

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

Back to the top