protected synchronized int determineMinimumNumberOfParentDirs(){
  int result;
  HashSet<String> files;
  int num;
  int i;
  int max;
  result=-1;
  max=0;
  for (i=0; i < m_RecentItems.size(); i++)   max=Math.max(max,FileUtils.getDirectoryDepth(m_RecentItems.get(i)));
  num=0;
  do {
    files=new HashSet<String>();
    for (i=0; i < m_RecentItems.size(); i++)     files.add(FileUtils.createPartialFilename(m_RecentItems.get(i),num));
    if (files.size() == m_RecentItems.size())     result=num;
 else     num++;
  }
 while ((files.size() < m_RecentItems.size()) && (num <= max));
  return result;
}

protected synchronized int determineMinimumNumberOfParentDirs ( ) { int result ; HashSet < String > files ; int num ; int i ; int max ; result = - 1 ; max = 0 ; for ( i = 0 ; i < m_RecentItems . size ( ) ; i ++ ) max = Math . max ( max , FileUtils . getDirectoryDepth ( m_RecentItems . get ( i ) ) ) ; num = 0 ; do { files = new HashSet < String > ( ) ; for ( i = 0 ; i < m_RecentItems . size ( ) ; i ++ ) files . add ( FileUtils . createPartialFilename ( m_RecentItems . get ( i ) , num ) ) ; if ( files . size ( ) == m_RecentItems . size ( ) ) result = num ; else num ++ ; } while ( ( files . size ( ) < m_RecentItems . size ( ) ) && ( num <= max ) ) ; return result ; }
determines the minimum number of parent directories that need to be included in the filename to make the filenames in the menu distinguishable .
