Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354143

Summary: Markers not removed for resolved cross references
Product: [Modeling] TMF Reporter: bsanders151
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: clay, sven.efftinge
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description bsanders151 CLA 2011-08-08 10:43:36 EDT
Build Identifier: I20110613-1736

Editor shows error markers for cross references to objects defined in another file even though the references have actually been resolved.  The fact that the references are resolved was determined by looking at the file with generic emf form editor.  Markers do not show up when looking at the serialized output either.   Everything uses out-of-the-box xtext except changing the scoping to URI based.

Once in a while the markers go away, but I haven't been able to determine why.  

Reproducible: Sometimes

Steps to Reproduce:
1.(Language is called cp)  
In generateCp.mwe2 enable URI based scoping

			// scoping and exporting API
			 fragment = scoping.ImportURIScopingFragment {}
			 fragment = exporting.SimpleNamesFragment {}

			// scoping and exporting API 
//			fragment = scoping.ImportNamespacesScopingFragment {}
//			fragment = exporting.QualifiedNamesFragment {}
//			fragment = builder.BuilderIntegrationFragment {}


2.
The Cp.xtext is
grammar abc.cp.Cp with org.eclipse.xtext.common.Terminals

generate cp "http://www.cp.abc/Cp"

//import "http://www.eclipse.org/emf/2002/Ecore" as ecore

Root:
	(imports += Import )* 
	(defs += Def )*
	(refs += Ref)*
	;
	
Import:
	'import' importURI = STRING
;
	
Def:
	'int' name = ID
;

Ref:
	'use' name = [Def]
;



3.

Test programs p1.cp and p2.cp are in the same folder in eclipse workspace

p1.cp  

import "platform:/resource/cpscope/src/p2.cp"
int x
int y
use x
use y
use z
use w
use a


p2.cp
int w
int z


p1.cp should show an error on use a, but it also shows errors on use w and use z.  In an emf editor view, the references are correctly resolved.
Comment 1 Michael Clay CLA 2011-08-08 16:21:25 EDT
cannot reproduce this .pls review your platform uri path (correct project and folder names) first and  if correct attach your workspace for further tests


(In reply to comment #0)
> Build Identifier: I20110613-1736
> 
> Editor shows error markers for cross references to objects defined in another
> file even though the references have actually been resolved.  The fact that the
> references are resolved was determined by looking at the file with generic emf
> form editor.  Markers do not show up when looking at the serialized output
> either.   Everything uses out-of-the-box xtext except changing the scoping to
> URI based.
> 
> Once in a while the markers go away, but I haven't been able to determine why.  
> 
> Reproducible: Sometimes
> 
> Steps to Reproduce:
> 1.(Language is called cp)  
> In generateCp.mwe2 enable URI based scoping
> 
>             // scoping and exporting API
>              fragment = scoping.ImportURIScopingFragment {}
>              fragment = exporting.SimpleNamesFragment {}
> 
>             // scoping and exporting API 
> //            fragment = scoping.ImportNamespacesScopingFragment {}
> //            fragment = exporting.QualifiedNamesFragment {}
> //            fragment = builder.BuilderIntegrationFragment {}
> 
> 
> 2.
> The Cp.xtext is
> grammar abc.cp.Cp with org.eclipse.xtext.common.Terminals
> 
> generate cp "http://www.cp.abc/Cp"
> 
> //import "http://www.eclipse.org/emf/2002/Ecore" as ecore
> 
> Root:
>     (imports += Import )* 
>     (defs += Def )*
>     (refs += Ref)*
>     ;
> 
> Import:
>     'import' importURI = STRING
> ;
> 
> Def:
>     'int' name = ID
> ;
> 
> Ref:
>     'use' name = [Def]
> ;
> 
> 
> 
> 3.
> 
> Test programs p1.cp and p2.cp are in the same folder in eclipse workspace
> 
> p1.cp  
> 
> import "platform:/resource/cpscope/src/p2.cp"
> int x
> int y
> use x
> use y
> use z
> use w
> use a
> 
> 
> p2.cp
> int w
> int z
> 
> 
> p1.cp should show an error on use a, but it also shows errors on use w and use
> z.  In an emf editor view, the references are correctly resolved.
Comment 2 Sven Efftinge CLA 2011-08-09 02:59:10 EDT
setting to WORKSFORME until someone sheds some light on it.
Comment 3 Karsten Thoms CLA 2017-09-19 18:07:29 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 18:17:05 EDT
Closing all bugs that were set to RESOLVED before Neon.0