public static Collection<EStructuralFeature.Setting> find(EObject eObjectOfInterest, EObject eObject) { return new XbaseUsageCrossReferencer(eObject).findUsage(eObjectOfInterest); }
/** Replies if the given object is locally assigned. * * <p>An object is locally assigned when it is the left operand of an assignment operation. * * @param target the object to test. * @param containerToFindUsage the container in which the usages should be find. * @return {@code true} if the given object is assigned. * @since 0.7 */ protected boolean isLocallyAssigned(EObject target, EObject containerToFindUsage) { if (this.readAndWriteTracking.isAssigned(target)) { return true; } final Collection<Setting> usages = XbaseUsageCrossReferencer.find(target, containerToFindUsage); // field are assigned when they are not used as the left operand of an assignment operator. for (final Setting usage : usages) { final EObject object = usage.getEObject(); if (object instanceof XAssignment) { final XAssignment assignment = (XAssignment) object; if (assignment.getFeature() == target) { // Mark the field as assigned in order to be faster during the next assignment test. this.readAndWriteTracking.markAssignmentAccess(target); return true; } } } return false; }
if ((scope instanceof SarlAgent || scope instanceof SarlBehavior || scope instanceof SarlSkill) && isLocallyAssigned(jvmField, scope)) { final Collection<Setting> usages = XbaseUsageCrossReferencer.find(jvmField, scope); final Set<XtendMember> blocks = new HashSet<>(); boolean isAccessibleFromOutside = jvmField.getVisibility() != JvmVisibility.PRIVATE;
return true; Collection<Setting> usages = XbaseUsageCrossReferencer.find(target, containerToFindUsage);
appendable.increaseIndentation(); ITreeAppendable withDebugging = appendable.trace(catchClause, true); if (!XbaseUsageCrossReferencer.find(catchClause.getDeclaredParam(), catchClause.getExpression()).isEmpty()) { ITreeAppendable parameterAppendable = withDebugging.trace(catchClause.getDeclaredParam()); appendCatchClauseParameter(catchClause, typeToUse, name, parameterAppendable.newLine());