Copy and paste this onto your shelf
string $sel[] = `ls -sl`;
string $extra[] = `listRelatives -parent -pa $sel[0]`; // get Extra node
string $childJt[] = `listRelatives -type "joint" $sel[0]`; // get child joint
string $loc[] = `spaceLocator`; // create locator to hold child joint
delete `parentConstraint -w 1 $childJt[0] $loc[0]`; // snap locator to child joint
refresh; // without refreshing, the values don't update
string $parcon[] = `parentConstraint -w 1 $loc[0] $childJt[0]`; // hold child joint
select -r $extra[0];
Copy and paste this onto your shelf.
delete $parcon $loc;
Select a control that you want to adjust the rotation axis for. Then click on the first new shelf button that you just made. This will do all the behind the scenes work and select the "Extra" node that you will use to adjust the rotation axis. When you are finished adjusting the rotation axis, click on the second shelf button you made to do clean up. Now select your control and see that the rotation axis is how you've adjusted it. And no joints should have moved in the process.
FYI...after the "//" is notation describing what the code is doing.