JvmTypeReference and eIsProxy [message #1696704] |
Thu, 28 May 2015 02:20  |
Eclipse User |
|
|
|
Hi
while working on https://bugs.eclipse.org/bugs/show_bug.cgi?id=468174 I
noted that in the JvmTypesBuilder in two places eIsProxy() is checked on
a JvmTypeReference; from what I understand, a JvmTypeReference will
never be a proxy, since it represents a reference, but it is not an EMF
reference itself; it is the contained JvmType that can be a proxy.
In particular, in the implementation of toGetter you read
if (typeRef != null && !typeRef.eIsProxy() &&
!InferredTypeIndicator.isInferred(typeRef)
&& typeRef.getType()!=null
&& !typeRef.getType().eIsProxy() &&
"boolean".equals(typeRef.getType().getIdentifier())) {
prefix = "is";
}
I guess the intention here is not to trigger type resolution, but indeed
type resolution is triggered by typeRef.getType() (and again,
typeRef.eIsProxy() will always return false.
Shouldn't JvmTypeReference.eIsProxy() be implemented in terms of
"type.eIsProxy()"?
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
|
|
|
|
Re: JvmTypeReference and eIsProxy [message #1696777 is a reply to message #1696773] |
Thu, 28 May 2015 10:04   |
Eclipse User |
|
|
|
On 28/05/2015 15:46, Sven Efftinge wrote:
> Yes, that's a bug.
OK, I'll submit a bug shortly, with a patch proposal:
at least, I think the important thing is that scoping is not triggered
on the original type reference, but on the cloned one.
I'm not planning to touch eIsProxy implementation.
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04473 seconds