Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to fix "Syntax error:A return type must be specified for java extensions!"
How to fix "Syntax error:A return type must be specified for java extensions!" [message #687751] Thu, 23 June 2011 06:30 Go to next message
Raymond Feng is currently offline Raymond FengFriend
Messages: 4
Registered: July 2009
Junior Member
After upgrading to Indigo, I'm getting an error message for an ".ext" file.

Syntax error:A return type must be specified for java extensions!

But the error marker doesn't seem to point to valid location. In my case, it points to a comment block (/* ... */). After changing some of the extended functions, the location changes.

What does it mean? How to fix it?

Thanks,
Raymond
Re: How to fix "Syntax error:A return type must be specified for java extensions!" [message #687754 is a reply to message #687751] Thu, 23 June 2011 06:48 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Raymond,

please provide the ext-file in question. Have a look for JAVA extensions
that do not specify an explicit return type and try to add one there.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 23.06.11 08:30, schrieb Raymond Feng:
> After upgrading to Indigo, I'm getting an error message for an ".ext" file.
>
> Syntax error:A return type must be specified for java extensions!
>
> But the error marker doesn't seem to point to valid location. In my
> case, it points to a comment block (/* ... */). After changing some of
> the extended functions, the location changes.
>
> What does it mean? How to fix it?
>
> Thanks,
> Raymond
>
Re: How to fix "Syntax error:A return type must be specified for java extensions!" [message #687768 is a reply to message #687754] Thu, 23 June 2011 07:42 Go to previous messageGo to next message
Raymond Feng is currently offline Raymond FengFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

I checked all the functions that are implemented in Java. All of them have a return type (such String, boolean, or Void). For example,

String getCollectionType(Reference ref) :
JAVA com.sample.generator.util.GenerationHelper.getCollectionType(com.sample.metamodel.Reference);

The java method returns String.

What am I missing here?
Re: How to fix "Syntax error:A return type must be specified for java extensions!&a [message #688217 is a reply to message #687768] Fri, 24 June 2011 07:26 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Please file a bugzilla with a reproducable example.

Thanks,
Sven

Am 6/23/11 9:42 AM, schrieb Raymond Feng:
> Hi,
>
> I checked all the functions that are implemented in Java. All of them
> have a return type (such String, boolean, or Void). For example,
>
> String getCollectionType(Reference ref) :
> JAVA
> com.sample.generator.util.GenerationHelper.getCollectionType(com.sample.metamodel.Reference);
>
>
> The java method returns String.
>
> What am I missing here?


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Previous Topic:Referencing existing metamodels in a DSL
Next Topic:Connecting Xtext DSL to external Ecore model
Goto Forum:
  


Current Time: Wed Apr 24 16:52:38 GMT 2024

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

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

Back to the top