public IScope createConstructorCallSerializationScope(EObject context) { if (!(context instanceof XConstructorCall)) { return IScope.NULLSCOPE; } XConstructorCall constructorCall = (XConstructorCall) context; JvmConstructor constructor = constructorCall.getConstructor(); if (constructor.eIsProxy()) { return IScope.NULLSCOPE; } return doCreateConstructorCallSerializationScope(constructorCall); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmConstructor getConstructor() { if (constructor != null && constructor.eIsProxy()) { InternalEObject oldConstructor = (InternalEObject)constructor; constructor = (JvmConstructor)eResolveProxy(oldConstructor); if (constructor != oldConstructor) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, XbasePackage.XCONSTRUCTOR_CALL__CONSTRUCTOR, oldConstructor, constructor)); } } return constructor; }
public JvmGenericType getSuperType(AnonymousClass anonymousClass) { JvmConstructor constructor = anonymousClass.getConstructorCall().getConstructor(); if(constructor != null && ! constructor.eIsProxy()) { JvmDeclaredType declaringType = constructor.getDeclaringType(); JvmType superType = Iterables.getLast(declaringType.getSuperTypes()).getType(); if(superType instanceof JvmGenericType) return (JvmGenericType) superType; } return null; }
protected void highlightConstructorCall(XConstructorCall constructorCall, IHighlightedPositionAcceptor acceptor) { if (constructorCall.getConstructor() != null && !constructorCall.getConstructor().eIsProxy()) { EObject declaringType = constructorCall.getConstructor().getDeclaringType(); if (declaringType instanceof JvmGenericType) { highlightFeature(acceptor, constructorCall, XbasePackage.Literals.XCONSTRUCTOR_CALL__CONSTRUCTOR, getStyle((JvmGenericType) declaringType)); } } }
protected IConstructorLinkingCandidate getKnownConstructor(XConstructorCall constructorCall, AbstractTypeComputationState state, ResolvedTypes resolvedTypes) { IConstructorLinkingCandidate result = resolvedTypes.getConstructor(constructorCall); if (result != null) { return result; } EObject proxyOrResolved = (EObject) constructorCall.eGet(XbasePackage.Literals.XCONSTRUCTOR_CALL__CONSTRUCTOR, false); if (proxyOrResolved == null) { result = new NullConstructorLinkingCandidate(constructorCall, state); return result; } if (!proxyOrResolved.eIsProxy()) { result = state.createResolvedLink(constructorCall, (JvmConstructor) proxyOrResolved); return result; } if (!encoder.isCrossLinkFragment(constructorCall.eResource(), EcoreUtil.getURI(proxyOrResolved).fragment())) { JvmConstructor constructor = constructorCall.getConstructor(); if (!constructor.eIsProxy()) { return state.createResolvedLink(constructorCall, constructor); } } return null; }