protected boolean validateSARLSpecificElements ( IJavaProject javaProject ) { // Check if the "SARL" generation directory is a source folder. final IPath outputPath = SARLPreferences . getSARLOutputPathFor ( javaProject . getProject ( ) ) ; if ( outputPath == null ) { final String message = MessageFormat . format ( Messages . BuildSettingWizardPage_0 , SARLConfig . FOLDER_SOURCE_GENERATED ) ; final IStatus status = SARLEclipsePlugin . getDefault ( ) . createStatus ( IStatus . ERROR , message ) ; handleFinishException ( getShell ( ) , new InvocationTargetException ( new CoreException ( status ) ) ) ; return false ; } if ( ! hasSourcePath ( javaProject , outputPath ) ) { final String message = MessageFormat . format ( Messages . SARLProjectCreationWizard_0 , toOSString ( outputPath ) , buildInvalidOutputPathMessageFragment ( javaProject ) ) ; final IStatus status = SARLEclipsePlugin . getDefault ( ) . createStatus ( IStatus . ERROR , message ) ; handleFinishException ( getShell ( ) , new InvocationTargetException ( new CoreException ( status ) ) ) ; return false ; } return true ; }
Validate the SARL properties of the new projects .