Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Still pending] [Xtext 2.7.3] : It sounds like a bug
[Still pending] [Xtext 2.7.3] : It sounds like a bug [message #1552112] Thu, 08 January 2015 01:24 Go to next message
Didier Garcin is currently offline Didier GarcinFriend
Messages: 68
Registered: April 2013
Member
Subprogram_specification: Function_specification | Procedure_specification
;
	
Procedure_specification: overridingIndicator=Overriding_indicator? PROCEDURE_ name=IDENTIFIER formalPart=Formal_part?;

Function_specification: overridingIndicator=Overriding_indicator? FUNCTION_ name=Direct_name parameterAndResultProfile=Parameter_and_result_profile;

Direct_name returns ecore::EString:
	  IDENTIFIER
    | OPERATOR_SYMBOL
    ;

Overriding_indicator: {Overriding_indicator}
        (not?=NOT_)? OVERRIDING_



This xtext spec is the origin of these errors :

Description Resource Path Location Type
Duplicate field BoPackage.FUNCTION_SPECIFICATION__NAME BoPackage.java line 1713 Java Problem
Duplicate field BoPackage.FUNCTION_SPECIFICATION__NAME BoPackage.java line 1731 Java Problem
Duplicate field BoPackage.FUNCTION_SPECIFICATION__NAME BoPackage.java line 1749 Java Problem
Duplicate field BoPackage.FUNCTION_SPECIFICATION__OVERRIDING_INDICATOR BoPackage.java line 1704 Java Problem
Duplicate field BoPackage.FUNCTION_SPECIFICATION__OVERRIDING_INDICATOR BoPackage.java line 1740 Java Problem
Duplicate field BoPackage.PROCEDURE_SPECIFICATION__NAME BoPackage.java line 1640 Java Problem
Duplicate field BoPackage.PROCEDURE_SPECIFICATION__NAME BoPackage.java line 1658 Java Problem
Duplicate field BoPackage.PROCEDURE_SPECIFICATION__NAME BoPackage.java line 1676 Java Problem
Duplicate field BoPackage.PROCEDURE_SPECIFICATION__OVERRIDING_INDICATOR BoPackage.java line 1631 Java Problem
Duplicate field BoPackage.PROCEDURE_SPECIFICATION__OVERRIDING_INDICATOR BoPackage.java line 1667 Java Problem
Duplicate method getFunction_specification_Name() in type BoPackage BoPackage.java line 11006 Java Problem
Duplicate method getFunction_specification_Name() in type BoPackage BoPackage.java line 11028 Java Problem
Duplicate method getProcedure_specification_Name() in type BoPackage BoPackage.java line 10952 Java Problem
Duplicate method getProcedure_specification_Name() in type BoPackage BoPackage.java line 10974 Java Problem
Duplicate method getFunction_specification_Name() in type BoPackageImpl BoPackageImpl.java line 3226 Java Problem
Duplicate method getFunction_specification_Name() in type BoPackageImpl BoPackageImpl.java line 3246 Java Problem
Duplicate method getProcedure_specification_Name() in type BoPackageImpl BoPackageImpl.java line 3172 Java Problem
Duplicate method getProcedure_specification_Name() in type BoPackageImpl BoPackageImpl.java line 3192 Java Problem
Duplicate method getName() in type Function_specification Function_specification.java line 67 Java Problem
Duplicate method getName() in type Function_specification Function_specification.java line 119 Java Problem
Duplicate method setName(String) in type Function_specification Function_specification.java line 77 Java Problem
Duplicate method setName(String) in type Function_specification Function_specification.java line 129 Java Problem


Second point :

I'm trying to keep hightest as possible in type hierarchy the attribute, name. This is for the need of crossref stage.
How may I ensure this ?


Thanks for your help

[Updated on: Fri, 09 January 2015 08:26]

Report message to a moderator

Re: [Xtext 2.7.3] : It sounds like a bug [message #1552514 is a reply to message #1552112] Thu, 08 January 2015 06:46 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Didier,

Please avoid underscore characters in your rule names. There are two
reasons for that:
1) Xtext will derived (eventually) Java class names from rule names and
underscores are generally not a good idea in those but CamelCase
notation is prefered.
2) The EMF generator that is used to produce the Java code will use
underscore characters as a delimiter between ClassName_fieldName for
some constants that it generates.

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: [Xtext 2.7.3] : It sounds like a bug [message #1552580 is a reply to message #1552112] Thu, 08 January 2015 07:37 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Sebastian, if it is recommended to avoid underscores in names, would this be worth a warning in Xtext?

Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: [Xtext 2.7.3] : It sounds like a bug [message #1552602 is a reply to message #1552580] Thu, 08 January 2015 07:51 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Am 08.01.15 um 08:37 schrieb Karsten Thoms:
> Sebastian, if it is recommended to avoid underscores in names, would
> this be worth a warning in Xtext?

Now that we have configurable severities for the Xtext grammar language,
we could consider this, yes. Could you please file a ticket?

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: [Xtext 2.7.3] : It sounds like a bug [message #1553339 is a reply to message #1552602] Thu, 08 January 2015 16:48 Go to previous message
Didier Garcin is currently offline Didier GarcinFriend
Messages: 68
Registered: April 2013
Member
I still have the same problems despite the suggested corrections.

Who can help me ?

Which is the eclipse plugin responsible ?

[Updated on: Fri, 09 January 2015 08:15]

Report message to a moderator

Previous Topic:How to write grammar to select a set of elements in any order but without repeating
Next Topic:JSON Grammar
Goto Forum:
  


Current Time: Wed Apr 24 21:56:08 GMT 2024

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

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

Back to the top