Differentiate two instances of the same application in the dock
This is a solution for your particular issue, and not OSX apps in general on which I believe do not have this issue. 

Workspace identifiers for Eclipse on OSX