Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to handle Access restriction error
How to handle Access restriction error [message #1715460] Mon, 23 November 2015 20:02 Go to next message
Larry LeBron is currently offline Larry LeBronFriend
Messages: 124
Registered: October 2015
Senior Member
I am trying to import an Xtend class in my main DSL project from my test project and getting this error:

Access restriction: The type <UtilClassName> is not accessible due to restriction on required project <DSLProject>

Any advice on how to correct this?

Greater detail:

My DSL project and package are org.example.expressions.
The Util Class is in that project, in package org.example.expressions.util

I see that this package is in the export list in the manifest of org.example.expressions.

Likewise, org.example.expressions is on the manifest for required bundles in my test project.

Thanks for any assistance!
Re: How to handle Access restriction error [message #1715463 is a reply to message #1715460] Mon, 23 November 2015 20:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14716
Registered: July 2009
Senior Member
Hi this sounds very strange to me. Did you double check the exported package list? There is an add button

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to handle Access restriction error [message #1715479 is a reply to message #1715463] Mon, 23 November 2015 23:10 Go to previous message
Larry LeBron is currently offline Larry LeBronFriend
Messages: 124
Registered: October 2015
Senior Member
Thanks, yep, it was my error.

It turns out that there is another package, which must have been generated by xtext <dslPackage>.dslName.util. So, in this case, org.example.expressions.expressions.util. In addition, this package is automatically added to the manifest export list.

I didn't notice the extra "expressions" nesting, so thought that my package, org.example.expressions.util was being exported.

Thanks for encouraging me to go back over it.

[Updated on: Mon, 23 November 2015 23:11]

Report message to a moderator

Previous Topic:Adding SuperType in inferrer with generic parameter depending of an XExpression
Next Topic:XText Formatter2; textRegionsAccess undefined
Goto Forum:
  


Current Time: Tue Sep 24 17:26:09 GMT 2024

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

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

Back to the top