@Override
	protected void visitVistaPackage(VistaPackage routinePackage) {
		try {
			if (! routinePackage.isUncategorized()) {		
				this.packageFanouts = new HashSet<EntryId>();
				this.recorder = new FanoutRecorder(routinePackage.getPackageFanoutFilter());
				
				super.visitVistaPackage(routinePackage);
				if (this.packageFanouts.size() > 0) {
					++this.packageCount;
					if (this.numPackages > 1) {
						this.fileWrapper.writeEOL("--------------------------------------------------------------");
						this.fileWrapper.writeEOL();
						this.fileWrapper.writeEOL(String.valueOf(this.packageCount) + ". PACKAGE NAME: " + routinePackage.getPackageName());
						this.fileWrapper.writeEOL();
					} else {
						this.fileWrapper.writeEOL("PACKAGE NAME: " + routinePackage.getPackageName());
						this.fileWrapper.writeEOL();				
					}
					
					List<EntryId> result = new ArrayList<EntryId>(this.packageFanouts);
					Collections.sort(result);
					Map<String, List<EntryId>> resultByPackage = new HashMap<String, List<EntryId>>();
					for (EntryId eid : result) {
						String routineName = eid.getRoutineName();
						VistaPackage pkg = this.repositoryInfo.getPackageFromRoutineName(routineName);
						String prefix = pkg.getPrimaryPrefix();
						List<EntryId> pkgEntryIds = resultByPackage.get(prefix);
						if (pkgEntryIds == null) {
							pkgEntryIds = new ArrayList<EntryId>();
							resultByPackage.put(prefix, pkgEntryIds);
						}
						pkgEntryIds.add(eid);
					}
					
					List<String> keys = new ArrayList<String>(resultByPackage.keySet());
					Collections.sort(keys);
					for (String key : keys) {
						List<EntryId> pkgEntryIds = resultByPackage.get(key);
						for (EntryId eid : pkgEntryIds) {
							String info = " " + eid.toString();
							String routineName = eid.getRoutineName();
							VistaPackage pkg = this.repositoryInfo.getPackageFromRoutineName(routineName);
							info += " (" + pkg.getPackageName() + ")";
							this.fileWrapper.write(info);
							this.fileWrapper.writeEOL();							
						}
					}
					if (this.numPackages > 1) {		
						this.fileWrapper.writeEOL();
						this.fileWrapper.writeEOL("--------------------------------------------------------------");
						this.fileWrapper.writeEOL();
					}
				}
			}
		} catch (IOException e) {
			MRALogger.logError("Unable to write result", e);
		}
	}