Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » DefaultGlobalScopeProvider and "class path mechanism"
DefaultGlobalScopeProvider and "class path mechanism" [message #1388436] Thu, 26 June 2014 12:54 Go to next message
Gregoire Dupe is currently offline Gregoire DupeFriend
Messages: 75
Registered: September 2009
Location: France

I would like to be able to resolve a reference from a qualified name based on the Java class path. Assuming that I've one file 'F1.myDsl' (stored in the package com.example.app1) referring to another file 'F2.myDSL' (stored in the package com.example.app2) :

myApp F1 {
ref com.example.app2.F2

The linking works fine when I load manually F2 and F1 in the resourceSet, but when I load only F1 (expecting that DefaultGlobalScopeProvider would find F2) the linking fail.

Can anybody tell me how to enable the the "class path mechanism"?

Re: DefaultGlobalScopeProvider and "class path mechanism" [message #1388569 is a reply to message #1388436] Thu, 26 June 2014 16:34 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13525
Registered: July 2009
Senior Member

am not sure if i get your problem. and i dont know such a possibity, but the following works for me

	'Hello' name=ID ('from' from=[Greeting]) '!';

public class Main {
	public static void main(String[] args) throws IOException {
		Reader reader = new Reader();
		reader.addRegister(new MyDslStandaloneSetup());
		SlotEntry outputSlot = new SlotEntry();
		WorkflowContextImpl ctx = new WorkflowContextImpl();
		for(Greeting g : (List<Greeting>)ctx.get("model")) {
			System.out.println(g.getName() + " " + g.getFrom());



Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Settings two attributes when consuming one token
Next Topic:Making QualifiedNamed reference an EObject
Goto Forum:

Current Time: Sun Aug 09 15:23:22 GMT 2020

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

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

Back to the top