当前位置: 首页>>代码示例>>Java>>正文


Java XPostfixOperation类代码示例

本文整理汇总了Java中org.eclipse.xtext.xbase.XPostfixOperation的典型用法代码示例。如果您正苦于以下问题:Java XPostfixOperation类的具体用法?Java XPostfixOperation怎么用?Java XPostfixOperation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XPostfixOperation类属于org.eclipse.xtext.xbase包,在下文中一共展示了XPostfixOperation类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSyntacticReceiver

import org.eclipse.xtext.xbase.XPostfixOperation; //导入依赖的package包/类
public XExpression getSyntacticReceiver(XExpression expression) {
	if (expression instanceof XAbstractFeatureCall) {
		if (expression instanceof XFeatureCall) {
			return null;
		}
		if (expression instanceof XMemberFeatureCall) {
			return ((XMemberFeatureCall) expression).getMemberCallTarget();
		}
		if (expression instanceof XAssignment) {
			return ((XAssignment) expression).getAssignable();
		}
		if (expression instanceof XBinaryOperation) {
			return ((XBinaryOperation) expression).getLeftOperand();
		}
		if (expression instanceof XUnaryOperation) {
			return ((XUnaryOperation) expression).getOperand();
		}
		if (expression instanceof XPostfixOperation) {
			return ((XPostfixOperation) expression).getOperand();
		}
	}
	return null;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:24,代码来源:FeatureLinkHelper.java

示例2: getSyntacticArguments

import org.eclipse.xtext.xbase.XPostfixOperation; //导入依赖的package包/类
public List<XExpression> getSyntacticArguments(XAbstractFeatureCall expression) {
	if (expression instanceof XFeatureCall) {
		return ((XFeatureCall) expression).getFeatureCallArguments();
	}
	if (expression instanceof XMemberFeatureCall) {
		return ((XMemberFeatureCall) expression).getMemberCallArguments();
	}
	if (expression instanceof XAssignment) {
		return Collections.singletonList(((XAssignment) expression).getValue());
	}
	if (expression instanceof XBinaryOperation) {
		return Collections.singletonList(((XBinaryOperation) expression).getRightOperand());
	}
	// explicit condition to make sure we thought about it
	if (expression instanceof XUnaryOperation) {
		return Collections.emptyList();
	}
	if (expression instanceof XPostfixOperation) {
		return Collections.emptyList();
	}
	return Collections.emptyList();
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:23,代码来源:FeatureLinkHelper.java

示例3: checkAssignment

import org.eclipse.xtext.xbase.XPostfixOperation; //导入依赖的package包/类
@Check
public void checkAssignment(XPostfixOperation postfixOperation) {
	if (expressionHelper.isGetAndAssign(postfixOperation)) {
		XExpression firstArgument = postfixOperation.getActualArguments().get(0);
		checkAssignment(firstArgument, false);
	}
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:8,代码来源:XbaseValidator.java

示例4: getSyntaxDescriptions

import org.eclipse.xtext.xbase.XPostfixOperation; //导入依赖的package包/类
@Override
protected String getSyntaxDescriptions() {
	XExpression expression = getExpression();
	if (expression instanceof XBinaryOperation) {
		return "binary operation";
	} else if (expression instanceof XUnaryOperation) {
		return "unary operation";
	} else if (expression instanceof XPostfixOperation) {
		return "postfix operation";
	} else {
		return "feature call";
	}
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:14,代码来源:AmbiguousFeatureLinkingCandidate.java

示例5: startsWithUnaryOperator

import org.eclipse.xtext.xbase.XPostfixOperation; //导入依赖的package包/类
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;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:11,代码来源:XbaseSyntacticSequencer.java

示例6: _format

import org.eclipse.xtext.xbase.XPostfixOperation; //导入依赖的package包/类
protected void _format(final XPostfixOperation expr, @Extension final IFormattableDocument doc) {
  final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
    it.noSpace();
  };
  doc.prepend(this.textRegionExtensions.regionFor(expr).feature(XbasePackage.Literals.XABSTRACT_FEATURE_CALL__FEATURE), _function);
  doc.<XExpression>format(expr.getOperand());
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:8,代码来源:XbaseFormatter.java

示例7: sequence_XPostfixOperation

import org.eclipse.xtext.xbase.XPostfixOperation; //导入依赖的package包/类
@Deprecated
protected void sequence_XPostfixOperation(EObject context, XPostfixOperation semanticObject) {
	sequence_XPostfixOperation(createContext(context, semanticObject), semanticObject);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:5,代码来源:AbstractXbaseSemanticSequencer.java

示例8: isGetAndAssign

import org.eclipse.xtext.xbase.XPostfixOperation; //导入依赖的package包/类
public boolean isGetAndAssign(XAbstractFeatureCall featureCall) {
	if (!(featureCall instanceof XPostfixOperation)) {
		return false;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.MINUS_MINUS, DoubleExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.PLUS_PLUS, DoubleExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.MINUS_MINUS, FloatExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.PLUS_PLUS, FloatExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.MINUS_MINUS, LongExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.PLUS_PLUS, LongExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.MINUS_MINUS, IntegerExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.PLUS_PLUS, IntegerExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.MINUS_MINUS, ShortExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.PLUS_PLUS, ShortExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.MINUS_MINUS, CharacterExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.PLUS_PLUS, CharacterExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.MINUS_MINUS, ByteExtensions.class)) {
		return true;
	}
	if (isOperatorFromExtension(featureCall, OperatorMapping.PLUS_PLUS, ByteExtensions.class)) {
		return true;
	}
	return false;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:49,代码来源:XExpressionHelper.java

示例9: sequence_XPostfixOperation

import org.eclipse.xtext.xbase.XPostfixOperation; //导入依赖的package包/类
/**
 * Constraint:
 *     (operand=XPostfixOperation_XPostfixOperation_1_0_0 feature=[JvmIdentifiableElement|OpPostfix])
 */
protected void sequence_XPostfixOperation(EObject context, XPostfixOperation semanticObject) {
	genericSequencer.createSequence(context, semanticObject);
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:8,代码来源:AbstractCheckSemanticSequencer.java


注:本文中的org.eclipse.xtext.xbase.XPostfixOperation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。