I may have the time when I get the source code, but someone else may be able to code this faster than me. Here's my idea:
Create a new tab or menu in the IDE. You have to pick the Board you are using in the IDE menu anyways so why not create a drop down list that allows you to select a pin form a drop down list which shows all pins, and what they are (D1 = Digital, D9 = Digital + PWM, A0 = Analog, etc.). Then another menu allows you to decide if that pin is Input, Output, or Both. Then you select a Generate Code button and it creates the constants and void setup() code automatically. Would also be neat to be able to right click in the IDE code area and decide to auto generate the common statements and functions with generic names (if, if-else, switch cases, do, arrays, and a function). This could be great as a teaching point.
If I get the source code, I may try to at least do this for Uno and Nano.
Example 1 (I selected D1, D2, and D3 form the menu and decide I want to do something different for each one, below gets generated):
const int pin1 = D1
const int pin2 = D2
const int pin1 = D3
void setup() {
pinMode(pin1, OUTPUT); // declare the pin1 as an OUTPUT
pinMode(pin2, INPUT); // declare pin2 as an INPUT
// pin3 is both, no declaration required. I decide what to do with it in code
}
Example 2 (I auto-generated an IF statement):
if (valueA >= valueB){
/*
*do something here
*replace valueA and B with your variables
*replace test ">=" as needed
*/
}
Example 3 (Auto generate a function):
void functionA(){
//do stuff here.
}