String fileName = dialog.open( );
String fileName = previewImageText.getText( ).trim( ); if(fileName.length( ) != 0) { File file = new File( fileName ); if ( fileName.indexOf( '/' ) < 0 && fileName.indexOf( '\\' ) < 0 ) { if ( ReportPlugin.getDefault( ).getTemplatePreference( ) != null && ReportPlugin.getDefault( ) .getTemplatePreference( ) .trim( ) .length( ) != 0 ) { String path = ReportPlugin.getDefault( ) .getTemplatePreference( ) .trim( ); file = new File( path, fileName ); if ( file.exists( ) && file.isFile( ) ) { dialog.setFileName( file.getPath( ) ); } } } else if ( file.exists( ) && file.isFile( ) ) { dialog.setFileName( fileName ); } }   fileName = dialog.open( );
			public void widgetSelected( SelectionEvent e )			{				FileDialog dialog = new FileDialog( PlatformUI.getWorkbench( )						.getDisplay( )						.getActiveShell( ) );				dialog.setText( BROWSE_TITLE );				dialog.setFilterExtensions( IMAGE_FILEFILTERS );				String fileName = dialog.open( );				if ( fileName == null )				{					return;				}				previewImageText.setText( fileName );			}