Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Accessing resources in standalone mode(Trying to access resources of another grammar in standalone mode)
Accessing resources in standalone mode [message #1827370] Wed, 13 May 2020 19:19 Go to next message
Albert K is currently offline Albert KFriend
Messages: 2
Registered: May 2020
Junior Member
Hello,

I am currently attempting to use my DSL in standalone application, however I am getting some errors.

My main grammar is MainDsl(uses .maindsl extension). When I try to access ".maindsl" resources from the Main program
set.getResource(URI.createFileURI("D:/.../..../MainFile.maindsl"), true)
it works fine.

However I also need to access resources of another grammar OtherDsl(uses .otherdsl extension). When I try to access ".otherdsl" resources from the Main program
set.getResource(URI.createFileURI("D:/.../..../TestFile.otherdsl"), true);
I get the error Cannot create a resource for 'file:/D:/.../..../TestFile.otherdsl.'; a registered resource factory is needed.

How should I register this resource factory?

Thank you in advance.
Re: Accessing resources in standalone mode [message #1827374 is a reply to message #1827370] Wed, 13 May 2020 19:35 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13642
Registered: July 2009
Senior Member
just make sure both standalonesetups are called

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Standalone error when validating
Next Topic:Use IChangeSerializer for refactoring that changes multiple Xtext files
Goto Forum:
  


Current Time: Wed Oct 28 21:20:48 GMT 2020

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

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

Back to the top