Assuming you are using IntelliJ, once you import the gradle settings the Minecraft source code (along with all the other dependencies) would be under the "External Libraries" in your project. For the code it would be the 'net.minecraftforge:forge:1.X.X-X.X.X_mapped_snapshot' and for the assets (textures, json, etc.) it would be under the 'net.minecraft:client:extra:1.X.X'
Intellij also provides shortcuts to getting to the source code of a file by holding control and left clicking the class, method or field.
Eclipse is a somewhat similar process.