protected final int asyncCreateType ( ) { final int [ ] size = { 0 } ; final IRunnableWithProgress op = new WorkspaceModifyOperation ( ) { @ Override protected void execute ( IProgressMonitor monitor ) throws CoreException , InvocationTargetException , InterruptedException { size [ 0 ] = createSARLType ( monitor ) ; } } ; try { getContainer ( ) . run ( true , false , op ) ; } catch ( InterruptedException e ) { // canceled by user return 0 ; } catch ( InvocationTargetException e ) { final Throwable realException = e . getTargetException ( ) ; SARLEclipsePlugin . getDefault ( ) . openError ( getShell ( ) , getTitle ( ) , realException . getMessage ( ) , realException ) ; } return size [ 0 ] ; }
Create the type from the data gathered in the wizard .