protected boolean isImplicitFirstArgument(XAbstractFeatureCall featureCall) { boolean result = featureCall.eContainingFeature() == XbasePackage.Literals.XABSTRACT_FEATURE_CALL__IMPLICIT_FIRST_ARGUMENT; return result; }
protected String getImplicitlyMessagePart(XAbstractFeatureCall featureCall) { EStructuralFeature containingFeature = featureCall.eContainingFeature(); if (containingFeature == XbasePackage.Literals.XABSTRACT_FEATURE_CALL__IMPLICIT_FIRST_ARGUMENT || containingFeature == XbasePackage.Literals.XABSTRACT_FEATURE_CALL__IMPLICIT_RECEIVER) { return "implicitly "; } return ""; }
protected boolean isImplicitReceiver(XAbstractFeatureCall featureCall) { boolean result = featureCall.eContainingFeature() == XbasePackage.Literals.XABSTRACT_FEATURE_CALL__IMPLICIT_RECEIVER; return result; }
private boolean isOuterTypeLiteral(XAbstractFeatureCall featureCall) { if (featureCall.eContainingFeature() == XbasePackage.Literals.XMEMBER_FEATURE_CALL__MEMBER_CALL_TARGET) { XMemberFeatureCall container = (XMemberFeatureCall) featureCall.eContainer(); if (container.isTypeLiteral()) { return true; } } return false; }
public boolean isDefiniteTypeLiteral(XAbstractFeatureCall featureCall) { if (featureCall.isExplicitOperationCallOrBuilderSyntax()) return false; if (!featureCall.getTypeArguments().isEmpty()) return false; if (featureCall.eContainingFeature() == XbasePackage.Literals.XMEMBER_FEATURE_CALL__MEMBER_CALL_TARGET) { XMemberFeatureCall container = (XMemberFeatureCall) featureCall.eContainer(); if (container.isExplicitStatic()) { return true; } return isDefiniteTypeLiteral(container); } return false; }
public XAbstractFeatureCall getRootTypeLiteral(XAbstractFeatureCall featureCall) { if (featureCall.isTypeLiteral()) { return featureCall; } if (featureCall.isPackageFragment()) { return getRootTypeLiteral((XAbstractFeatureCall) featureCall.eContainer()); } if (featureCall.getFeature() == null || featureCall.getFeature().eIsProxy()) { // syntactic check if (featureCall instanceof XFeatureCall || featureCall instanceof XMemberFeatureCall) { if (!isPotentialTypeLiteral(featureCall, null)) { return null; } if (featureCall instanceof XMemberFeatureCall) { return doGetRootTypeLiteral((XMemberFeatureCall) featureCall); } if (featureCall instanceof XFeatureCall) { if (featureCall.eContainingFeature() == XbasePackage.Literals.XMEMBER_FEATURE_CALL__MEMBER_CALL_TARGET) { return doGetRootTypeLiteral((XMemberFeatureCall) featureCall.eContainer()); } } } } return null; }