I think you mean SQL Developer 4.0.1. Anyway, there have been issues reported in this area. See the following:
Since I constantly switch between versions of SQL Developer, I tend to leave sql files associated with my favorite text editor. However, I did a quick test, associating the sql file extension (in 4.0.1) with either
and it seemed to work fine. By the way, rather than setting the association in one of the ways mentioned in the referenced discussion, I just right-click on the sql file, then select Open with > Choose default program.
SQL Developer Team