* performs adding new callback method
*
* @param e event
*/
public final void performAction(ActionEvent e) {
CallbackType callbackType = getProjectController().getCurrentCallbackType();
// generate methodName
String methodNamePrefix = toMethodName(callbackType.getType());
String methodName;
// now that we're generating the method names based on the callback type, check to
// see if the
// raw prefix, no numbers, is taken.
if (!getCallbackMap()
.getCallbackDescriptor(callbackType.getType())
.getCallbackMethods()
.contains(methodNamePrefix)) {
methodName = methodNamePrefix;
}
else {
int counter = 1;
do {
methodName = methodNamePrefix + counter;
counter++;
} while (getCallbackMap()
.getCallbackDescriptor(callbackType.getType())
.getCallbackMethods()
.contains(methodName));
}
createCallbackMethod(getCallbackMap(), callbackType, methodName);