While installing Ubuntu 11.10, I converted by Fedora's ext4 partition to swap by mistake.
Please assist to recover the files and partition.
When formatting a partition as swap only the first few couples of bytes get overwritten, so the data should be recoverable to some extent.
I'd try testdisk and in its options mark the partition as ext4 and try to list files.
If that doesn't work, I'd try to recover by using the backup superblock (still in testdisk).
If still no luck, then try photorec to recover the files at least.
For more info see