本文整理了Java中org.eclipse.xtext.xbase.XAbstractFeatureCall.isOperation()
方法的一些代码示例,展示了XAbstractFeatureCall.isOperation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XAbstractFeatureCall.isOperation()
方法的具体详情如下:
包路径:org.eclipse.xtext.xbase.XAbstractFeatureCall
类名称:XAbstractFeatureCall
方法名:isOperation
暂无
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
private boolean isPotentialJavaOperation(XAbstractFeatureCall featureCall) {
if (featureCall.isOperation()) {
return true;
}
if (featureCall.eClass() == XbasePackage.Literals.XMEMBER_FEATURE_CALL && featureCall.isStatic() && featureCall.isExtension() && featureCall.getActualArguments().size() == 2) {
JvmIdentifiableElement feature = featureCall.getFeature();
if (feature.eClass() == TypesPackage.Literals.JVM_OPERATION) {
JvmDeclaredType declarator = ((JvmOperation) feature).getDeclaringType();
if (IntegerExtensions.class.getName().equals(declarator.getIdentifier()) || LongExtensions.class.getName().equals(declarator.getIdentifier())) {
String simpleName = feature.getSimpleName();
if (simpleName.startsWith("bitwise") || simpleName.startsWith("shift")) {
return true;
}
}
}
}
return false;
}
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
@Override
protected String getFeatureTypeName() {
XExpression expression = getExpression();
if (expression instanceof XAbstractFeatureCall && ((XAbstractFeatureCall) expression).isOperation()) {
return "operator declaration";
}
if (getPrimaryCandidate().isExtension()) {
return "extension method";
}
return super.getFeatureTypeName();
}
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
protected IScope getExecutableScope(XAbstractFeatureCall call, JvmIdentifiableElement feature) {
final String simpleName = feature.getSimpleName();
QualifiedName name = QualifiedName.create(simpleName);
if (call.isOperation()) {
QualifiedName operator = getOperator(call, name);
if (operator == null) {
return IScope.NULLSCOPE;
}
return new SingletonScope(EObjectDescription.create(operator, feature), IScope.NULLSCOPE);
}
if (call instanceof XAssignment) {
return getAccessorScope(simpleName, name, feature);
}
if (call.isExplicitOperationCallOrBuilderSyntax() || ((JvmExecutable) feature).getParameters().size() > 1
|| (!call.isExtension() && ((JvmExecutable) feature).getParameters().size() == 1)) {
return new SingletonScope(EObjectDescription.create(name, feature), IScope.NULLSCOPE);
}
return getAccessorScope(simpleName, name, feature);
}
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
} else if ((next instanceof XAbstractFeatureCall && ((XAbstractFeatureCall) next).isOperation())
|| (next instanceof XAssignment && currentThisType != null && !contains(currentThisType.getAllFeatures(), ((XAssignment) next).getFeature()))) {
collectStaticImportsFrom((XAbstractFeatureCall) next, indexedAmbiguousCandidates.get(next));
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase.ide
} else if (feature instanceof JvmOperation && !featureCall.isOperation()) {
JvmOperation jvmOperation = (JvmOperation) feature;
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
boolean _isOperation = ((XAbstractFeatureCall)contextObject).isOperation();
boolean _not = (!_isOperation);
if (_not) {
内容来源于网络,如有侵权,请联系作者删除!