copyFile( filePath, templateFolderPath + fileName );
if ( new File( targetPath ).exists( ) ) { String[] buttons = new String[]{ IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; String question = Messages.getFormattedString( "SaveAsDialog.overwriteQuestion", new Object[]{ targetPath } ); MessageDialog d = new MessageDialog( getShell( ), Messages.getString( "SaveAsDialog.Question" ), null, question, MessageDialog.QUESTION, buttons, 0 ); overwrite = d.open( ); } if ( overwrite == 0 ) { copyFile( filePath, templateFolderPath + fileName ); }
	public boolean performFinish( )	{		// copy to template folder		String templateFolderPath = ReportPlugin.getDefault( )				.getTemplatePreference( );		String filePath = SessionHandleAdapter.getInstance( )				.getReportDesignHandle( )				.getFileName( );		String fileName = filePath.substring( filePath.lastIndexOf( File.separator ) );		try		{			copyFile( filePath, templateFolderPath + fileName );		}		catch ( IOException e )		{			ExceptionHandler.handle( e );		}		try		{			setDesignFile( templateFolderPath + fileName );		}		catch ( DesignFileException e )		{			ExceptionHandler.handle( e );			return false;		}		catch ( SemanticException e )		{			ExceptionHandler.handle( e );			return false;		}		catch ( IOException e )		{			ExceptionHandler.handle( e );			return false;		}		return true;	}