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

Bug 362472

Summary: Couldn't resolve reference to NamedElement 'name'.
Product: [Modeling] OCL Reporter: chuck <admin.mind>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: CLOSED INVALID QA Contact:
Severity: minor    
Priority: P3 CC: ed
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description chuck CLA 2011-10-31 07:37:47 EDT
Build Identifier: I20110613-1736

I integrated the essentialOCL grammar in my xtext grammar ...so as in oclinecore project I added this imports and rules for example in simple mydsl:

grammar org.xtext.example.mydsl.MyDsl with org.eclipse.ocl.examples.xtext.essentialocl.EssentialOCL

import "http://www.eclipse.org/emf/2002/Ecore" as ecore
import "platform:/resource/org.eclipse.ocl.examples.xtext.base/model/BaseCST.ecore" as base
import "platform:/resource/org.eclipse.ocl.examples.xtext.essentialocl/model/EssentialOCLCST.ecore" as essentialocl
import "platform:/resource/org.eclipse.ocl.examples.pivot/model/pivot.ecore" as pivot


rules:

Filter: 
"#" specification=SpecificationCS?
;

SpecificationCS returns OCLinEcoreSpecificationCS:
	ownedExpression=ExpCS | exprString=UNQUOTED_STRING
;

terminal UNQUOTED_STRING:	// Never forward parsed; just provides a placeholder
	'£$%^£$%^'				//  for reverse serialisation of embedded OCL 
;

When I create a new mydsl file and in filter rule:
# o1.name (where o1 the ID of the container of Filter...)

I receive the error above

Reproducible: Always

Steps to Reproduce:
1.add to a new grammar mydsl the "with essentialocl "statement
2.import base,pivot,essentialocl CST ecore files in grammar
3.register genmodel and packages in mwe2 file(no errors in generation)
4.create a new rule with specificationCS reference 
5.launch eclipse application and create a new mydsl file and try to type: # name or something in the right place
Comment 1 Ed Willink CLA 2011-10-31 12:47:30 EDT
Extension of OCL Xtext grammars is not supported functionality. Users may extend, but they should have the skills to debug the bulk of their problems themselves and then contribute to making the code more easily extensible. 

The specific problem is probably a result of neglecting to provide any support for scope resolution.

Without an executable repro (e.g. a zipped project), I don't intend to attempt to follow the indications to investigate this unsupported issue.
Comment 2 chuck CLA 2011-10-31 14:46:21 EDT
(In reply to comment #1)
> Extension of OCL Xtext grammars is not supported functionality. Users may
> extend, but they should have the skills to debug the bulk of their problems
> themselves and then contribute to making the code more easily extensible. 
> 
> The specific problem is probably a result of neglecting to provide any support
> for scope resolution.
> 
> Without an executable repro (e.g. a zipped project), I don't intend to attempt
> to follow the indications to investigate this unsupported issue.

Dear Edward I'm trying to follow your suggestions... so I opened a bug and I'll provide a repro zipped... but i don't uderstand your reproachfully...i'm a student so I cannot know everything about a project that I'm building step by step... but U gave a me good hint... maybe I need to fix the scope...
Comment 3 Ed Willink CLA 2011-10-31 15:08:21 EDT
Your newsgroup message suggested you had found an old fixed bug reappearing, hence the justification for a new bug. In fact you are reporting bugs in your own code.

You must learn to debug your own code. You are wasting far too much of my time. I am happy to help those who help themselves, but not those who are doing things well beyond their capabilities and nonetheless demand help at the slightest hint of a problem.

As I wrote before use the OCLinEcore editor as an example. It works. Your code doesn't therefore it does not adequately imitate the OCLinEcore editor. Debug it.
Comment 4 Ed Willink CLA 2013-05-20 11:36:32 EDT
CLOSED after a year in the RESOLVED state.