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; }
@Override public Injector createInjectorAndDoEMFRegistration() { XtypeStandaloneSetup.doSetup(); Injector injector = createInjector(); register(injector); return injector; }
@Override public void configure(Binder binder) { properties = tryBindProperties(binder, "org/eclipse/xtext/xbase/Xbase.properties"); super.configure(binder); }
@Override public String apply(final XFeatureCall it) { return it.getConcreteSyntaxFeatureName(); } };
protected boolean startsWithUnaryOperator(EObject obj) { if(obj instanceof XUnaryOperation) return true; if(obj instanceof XBinaryOperation) return startsWithUnaryOperator(((XBinaryOperation)obj).getLeftOperand()); if(obj instanceof XPostfixOperation) { return startsWithUnaryOperator(((XPostfixOperation)obj).getOperand()); } return false; }
/** * @param context unused in this context but required for dispatching * @param indicator unused in this context but required for dispatching */ protected Object _doEvaluate(XBooleanLiteral literal, IEvaluationContext context, CancelIndicator indicator) { return literal.isIsTrue(); }
private boolean isTypeLiteral(XExpression memberCallTarget) { if (memberCallTarget instanceof XAbstractFeatureCall) { return ((XAbstractFeatureCall) memberCallTarget).isTypeLiteral(); } return false; }
/** * Only for testing purpose. * @nooverride This method is not intended to be re-implemented or extended by clients. * @noreference This method is not intended to be referenced by clients. */ /* @Nullable */ protected XExpression getElse(XIfExpression ifExpression) { return ifExpression.getElse(); }
protected boolean isSimpleFeatureCall(XExpression switch1) { if (switch1 instanceof XFeatureCall) { XFeatureCall featureCall = (XFeatureCall) switch1; return !(featureCall.getFeature() instanceof JvmOperation); } return false; }
/** * Only for testing purpose. * @nooverride This method is not intended to be re-implemented or extended by clients. * @noreference This method is not intended to be referenced by clients. */ protected List<XCasePart> getCases(XSwitchExpression switchExpression) { return switchExpression.getCases(); }
public StaticFeatureDescriptionWithImplicitReceiver(QualifiedName qualifiedName, JvmFeature feature, LightweightTypeReference receiverType, int bucketId, boolean visible) { super(qualifiedName, feature, bucketId, visible); this.implicitReceiverType = receiverType; this.implicitReceiver = XbaseFactory.eINSTANCE.createXFeatureCall(); }
protected XExpression getActualReceiver(final XAbstractFeatureCall expr) { return expr.getActualReceiver(); }
@Override public Injector createInjectorAndDoEMFRegistration() { EPackage.Registry.INSTANCE.put(XbasePackage.eINSTANCE.getNsURI(), XbasePackage.eINSTANCE); return super.createInjectorAndDoEMFRegistration(); } }
protected boolean isReassignFirstArgument(XAbstractFeatureCall featureCall) { if (featureCall instanceof XBinaryOperation) { XBinaryOperation binaryOperation = (XBinaryOperation) featureCall; return binaryOperation.isReassignFirstArgument(); } return false; }
protected List<XExpression> getActualArguments(XAbstractFeatureCall featureCall) { return featureCall.getActualArguments(); }
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 ""; }
@Override public String apply(final XFeatureCall call) { return call.getConcreteSyntaxFeatureName(); } }));
private boolean needMultiAssignment(XAbstractFeatureCall expr) { if (expr instanceof XBinaryOperation) { final XBinaryOperation binaryOperation = (XBinaryOperation) expr; return binaryOperation.isReassignFirstArgument(); } return false; }
protected boolean isImplicitFirstArgument(XAbstractFeatureCall featureCall) { boolean result = featureCall.eContainingFeature() == XbasePackage.Literals.XABSTRACT_FEATURE_CALL__IMPLICIT_FIRST_ARGUMENT; return result; }
protected boolean needMultiAssignment(XAbstractFeatureCall expr) { if (expr instanceof XBinaryOperation) { XBinaryOperation binaryOperation = (XBinaryOperation) expr; return binaryOperation.isReassignFirstArgument(); } return false; }