本文整理了Java中org.eclipse.xtext.xbase.XAbstractFeatureCall.getConcreteSyntaxFeatureName()
方法的一些代码示例,展示了XAbstractFeatureCall.getConcreteSyntaxFeatureName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XAbstractFeatureCall.getConcreteSyntaxFeatureName()
方法的具体详情如下:
包路径:org.eclipse.xtext.xbase.XAbstractFeatureCall
类名称:XAbstractFeatureCall
方法名:getConcreteSyntaxFeatureName
暂无
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
public boolean isOperatorFromExtension(XAbstractFeatureCall featureCall, QualifiedName operatorSymbol, Class<?> definingExtensionClass) {
return isOperatorFromExtension(featureCall, featureCall.getConcreteSyntaxFeatureName(), operatorSymbol, definingExtensionClass);
}
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
protected Object evaluateGetAndAssign(XAbstractFeatureCall featureCall, IEvaluationContext context, CancelIndicator indicator) {
XAbstractFeatureCall operand = (XAbstractFeatureCall) featureCall.getActualArguments().get(0);
Object originalValue = internalEvaluate(operand, context, indicator);
Object value = applyGetAndAssignOperator(originalValue, featureCall.getConcreteSyntaxFeatureName());
assignValueTo(operand.getFeature(), featureCall, value, context, indicator);
return originalValue;
}
代码示例来源:origin: io.sarl.lang/io.sarl.lang
/** Check if the call is discouraged.
*
* <p>One example of a discouraged feature is {@link System#err}.
*
* @param expression the expression.
*/
@Check(CheckType.FAST)
public void checkDiscouragedCalls(XAbstractFeatureCall expression) {
if (!isIgnored(DISCOURAGED_REFERENCE)
&& this.featureCallValidator.isDiscouragedCall(expression)) {
addIssue(
MessageFormat.format(Messages.SARLValidator_37,
expression.getConcreteSyntaxFeatureName()),
expression,
DISCOURAGED_REFERENCE);
}
}
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
protected void synthesizeIssuesForFollowUpErrors(Resource resource, List<Issue> result) {
List<EObject> contents = resource.getContents();
if (!contents.isEmpty()) {
IResolvedTypes resolvedTypes = typeResolver.resolveTypes(contents.get(0));
for(ILinkingCandidate linkingCandidate: resolvedTypes.getFollowUpErrors()) {
XExpression expression = linkingCandidate.getExpression();
IssueImpl issue = new Issue.IssueImpl();
issue.setUriToProblem(EcoreUtil.getURI(linkingCandidate.getExpression()));
if (expression instanceof XAbstractFeatureCall)
issue.setMessage(((XAbstractFeatureCall) expression).getConcreteSyntaxFeatureName() + " cannot be resolved");
else {
List<INode> nodes = NodeModelUtils.findNodesForFeature(expression, XbasePackage.Literals.XCONSTRUCTOR_CALL__CONSTRUCTOR);
if (nodes.size() >= 1) {
issue.setMessage(nodes.get(0).getText() + " cannot be resolved");
}
}
result.add(issue);
}
}
}
代码示例来源:origin: io.sarl.lang/io.sarl.lang
/** Get the string representation of an operator.
*
* @param call the call to the operator feature.
* @return the string representation of the operator or {@code null} if not a valid operator.
*/
protected String getOperatorSymbol(XAbstractFeatureCall call) {
if (call != null) {
final Resource res = call.eResource();
if (res instanceof StorageAwareResource) {
final boolean isLoadedFromStorage = ((StorageAwareResource) res).isLoadedFromStorage();
if (isLoadedFromStorage) {
final QualifiedName operator = getOperatorMapping().getOperator(
QualifiedName.create(call.getFeature().getSimpleName()));
return Objects.toString(operator);
}
}
return call.getConcreteSyntaxFeatureName();
}
return null;
}
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
protected String getOperator(final XAbstractFeatureCall call) {
String _switchResult = null;
Resource _eResource = call.eResource();
final Resource res = _eResource;
boolean _matched = false;
if (res instanceof StorageAwareResource) {
boolean _isLoadedFromStorage = ((StorageAwareResource)res).isLoadedFromStorage();
if (_isLoadedFromStorage) {
_matched=true;
QualifiedName _operator = this.operatorMapping.getOperator(QualifiedName.create(call.getFeature().getSimpleName()));
String _string = null;
if (_operator!=null) {
_string=_operator.toString();
}
return _string;
}
}
if (!_matched) {
_switchResult = call.getConcreteSyntaxFeatureName();
}
return _switchResult;
}
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase.ide
@Override
protected boolean highlightElement(EObject object, IHighlightedPositionAcceptor acceptor, CancelIndicator cancelIndicator) {
if (object instanceof XAbstractFeatureCall) {
if (((XAbstractFeatureCall) object).isPackageFragment()) {
return true;
}
if (SPECIAL_FEATURE_NAMES.contains(((XAbstractFeatureCall) object).getConcreteSyntaxFeatureName())) {
return false;
}
operationCanceledManager.checkCanceled(cancelIndicator);
computeFeatureCallHighlighting((XAbstractFeatureCall) object, acceptor);
} else if (object instanceof JvmTypeParameter) {
highlightTypeParameter((JvmTypeParameter) object, acceptor);
} else if (object instanceof JvmFormalParameter) {
highlightFormalParameter((JvmFormalParameter) object, acceptor);
} else if (object instanceof XVariableDeclaration) {
highlightVariableDeclaration((XVariableDeclaration) object, acceptor);
} else if (object instanceof XNumberLiteral) {
highlightNumberLiterals((XNumberLiteral) object, acceptor);
} else if (object instanceof XConstructorCall) {
highlightConstructorCall((XConstructorCall) object, acceptor);
} else if (object instanceof XAnnotation) {
// Handle XAnnotation in a special way because we want the @ highlighted too
highlightAnnotation((XAnnotation) object, acceptor);
} else {
computeReferencedJvmTypeHighlighting(acceptor, object, cancelIndicator);
}
return false;
}
代码示例来源:origin: io.sarl.lang/io.sarl.lang
name = featureNameProvider.getSimpleName(calledFeature);
} else {
name = featureCall.getConcreteSyntaxFeatureName();
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
XExpression leftOperand = ((XBinaryOperation)featureCall).getLeftOperand();
Object result = internalEvaluate(leftOperand, context, indicator);
String operatorName = featureCall.getConcreteSyntaxFeatureName();
if (equal(expressionHelper.getElvisOperator() ,operatorName)) {
if(result != null)
代码示例来源:origin: openhab/openhab-core
throw new ScriptExecutionException(_scriptError_1);
} else {
String _concreteSyntaxFeatureName_2 = featureCall.getConcreteSyntaxFeatureName();
String _plus_6 = ("Unknown variable or command \'" + _concreteSyntaxFeatureName_2);
String _plus_7 = (_plus_6 + "\'");
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase
XExpression target = memberFeatureCall.getMemberCallTarget();
if (target instanceof XAbstractFeatureCall
&& SUPER.getFirstSegment().equals(((XAbstractFeatureCall) target).getConcreteSyntaxFeatureName())) {
JvmIdentifiableElement targetFeature = ((XAbstractFeatureCall) target).getFeature();
String message = String.format("Cannot directly invoke the abstract method %s%s of the type %s",
内容来源于网络,如有侵权,请联系作者删除!