* Copy all identified references into the target project,
* applying any name mapping required by a nested mapper
* element.
*/
public void copyReferencesInto(Project newProject) {
FileNameMapper mapper = this.mapper == null
? null : this.mapper.getImplementation();
HashSet matches = new HashSet();
Hashtable src = getProject().getReferences();
for (Iterator it = references.iterator(); it.hasNext(); ) {
Reference ref = (Reference) it.next();
matches.clear();
ref.addMatchingReferences(src, matches);
for (Iterator ids = matches.iterator(); ids.hasNext(); ) {
String refid = (String) ids.next();
String toRefid = ref.getToRefid();
//transform the refid with the mapper if necessary
if (mapper != null && toRefid == null) {
String[] mapped = mapper.mapFileName(refid);
if (mapped != null) {
toRefid = mapped[0];
}
}
if (toRefid == null) {