@Override public Collection<?> doGetAffectedObjects() { return copyCommand.getAffectedObjects(); }
/** * Delegates to the getAffectedObjects method of the command. * @return the result. */ @Override public Collection<?> getAffectedObjects() { return command == null ? Collections.EMPTY_LIST : command.getAffectedObjects(); }
public Collection getAffectedObjects() { return baseCommand.getAffectedObjects(); }
/** * Returns the merged collection of all command affected objects. * @return the merged collection of all command affected objects. */ protected Collection<?> getMergedAffectedObjectsCollection() { Collection<Object> result = new ArrayList<Object>(); for (Command command : commandList) { result.addAll(command.getAffectedObjects()); } return result; }
@Override public final Collection<?> getAffectedObjects() { return overrideCommand != null ? overrideCommand.getAffectedObjects() : doGetAffectedObjects(); }
@Override public Collection<?> getAffectedObjects() { Collection<Object> result = new ArrayList<Object>(); result.addAll(addCommand.doGetAffectedObjects()); if (mapCommand != null) { result.addAll(mapCommand.getAffectedObjects()); } return result; }
@Override public Collection<?> getAffectedObjects() { return dropCommand != null ? dropCommand.getAffectedObjects() : super.getAffectedObjects(); }
@Override public Collection<?> getAffectedObjects() { Collection<Object> result = new ArrayList<Object>(); result.addAll(addCommand.doGetAffectedObjects()); if (mapCommand != null) { result.addAll(mapCommand.getAffectedObjects()); } return result; }
protected Collection getMergedAffectedObjectsCollection() { J2EEClipboard result = new J2EEClipboard(new ArrayList()); for (Iterator commands = commandList.iterator(); commands.hasNext();) { Command command = (Command) commands.next(); result.addAll(command.getAffectedObjects()); } return result; }
/** * Determines the affected objects by composing the affected objects of the commands in the list; * this is affected by the setting of {@link #resultIndex}. * @return the affected objects. */ @Override public Collection<?> getAffectedObjects() { if (commandList.isEmpty()) { return Collections.EMPTY_LIST; } else if (resultIndex == LAST_COMMAND_ALL) { return commandList.get(commandList.size() - 1).getAffectedObjects(); } else if (resultIndex == MERGE_COMMAND_ALL) { return getMergedAffectedObjectsCollection(); } else if (resultIndex < commandList.size()) { return commandList.get(resultIndex).getAffectedObjects(); } else { return Collections.EMPTY_LIST; } }
protected Set computeAffectedResourceSets() { Iterator objects = getTarget().getAffectedObjects().iterator(); Set resourceSets = new HashSet(); Object o = null; EObject ref = null; ResourceSet set = null; while (objects.hasNext()) { o = objects.next(); if (!(o instanceof EObject)) continue; ref = (EObject) o; if (ref.eResource() != null) { set = ref.eResource().getResourceSet(); if (set != null) resourceSets.add(set); } } return resourceSets; }