Refreshing your project if you've imported the gradle file or running gradlew eclipse/idea if you're using the command line will then compile with the IC2 API too.
oh tanks but I've solved, now I have another problem: I'm trying to create a generator block but if I use the .setUnlocalizedName() it give errors and crashes