I had a similar sounding situation with my Nexus 4. For me it was an issue with the drivers Windows was installing automatically. I followed the instructions in [Q]Computer won't recognize phone? - Post #8. I had some slight differences on Windows 7.
For me I,
- Uninstalled the driver from Device Manager
- Let it automatically install the generic 'MTP device driver'
- Right clicked on the new device and selected 'Update Driver'
- Selected 'Have Disk' and pointed it to [android-sdk-dir]\extras\google
- Watched an 'ADB' driver install.
- Opened Eclipse to successfully run on my Nexus 4.
Good luck!