UDIGConnectionPage tmp;
// create the specific connection page
if (state instanceof IntermediateState) {
IntermediateState intermediateState = (IntermediateState) state;
EndConnectionState endConnectionState = (EndConnectionState) intermediateState
.getEndState();
tmp = endConnectionState.getConnectionFactory().createConnectionPage(
intermediateState.getIndex());
} else {
EndConnectionState endConnectionState = (EndConnectionState) state;
tmp = (endConnectionState).getConnectionFactory().createConnectionPage(
endConnectionState.getDescriptor().getWizardPageCount() - 1);
}