if (result.getNodeType() != ASTNode.SIMPLE_NAME) {
final String errorMessage = Messages.ConvertConstantsToEnumRefactoring_WrongType;
status
.merge(RefactoringStatus
.createFatalErrorStatus(MessageFormat.format(errorMessage,new Object[] {node, node.getClass()})));
final IStatus stateStatus = new InternalStateStatus(IStatus.ERROR,
errorMessage);
throw new CoreException(stateStatus);
}
// Get the fully qualified type name.