String resourceFolder = getResourcePreference( ); if ( resourceFolder == null || resourceFolder.equals( "" ) || !new File( resourceFolder ).exists( ) )
String resourceFolder = SessionHandleAdapter.getInstance( ) .getSessionHandle( ) .getResourceFolder( ); if ( ( resourceFolder == null || resourceFolder.equals( "" ) ) && SessionHandleAdapter.getInstance( ).getReportDesignHandle( ) != null && SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ) .getResourceFolder( ) != null )
	public String getResourceFolder( )	{		String resourceFolder = getResourcePreference( );		if ( resourceFolder == null				|| resourceFolder.equals( "" ) //$NON-NLS-1$				|| !new File( resourceFolder ).exists( ) )		{			IEditorPart editor = UIUtil.getActiveEditor( true );			if ( editor != null )			{				IEditorInput input = editor.getEditorInput( );				Object fileAdapter = input.getAdapter( IFile.class );				IFile file = null;				if ( fileAdapter != null )					file = (IFile) fileAdapter;				if ( file != null && file.getProject( ) != null )				{					return file.getProject( ).getLocation( ).toOSString( );				}				if ( input instanceof IPathEditorInput )				{					File fileSystemFile = ( (IPathEditorInput) input ).getPath( )							.toFile( );					return fileSystemFile.getParent( );				}			}		}		return resourceFolder;	}