Revision 107

View differences:

org.gvsig.toolbox/trunk/org.gvsig.toolbox/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpIO.java
141 141

  
142 142
   /**
143 143
    * Returns the help associated with a given geoalgorithm as a html-formatted string
144
    * 
144
    *
145 145
    * @param alg
146 146
    *                the geoalgorithm
147 147
    * @param sFilename
......
367 367

  
368 368
   /**
369 369
    * Returns true if the help file associated with an algorithm contains a given search string
370
    * 
370
    *
371 371
    * @param alg
372 372
    *                the GeoAlgorithm
373 373
    * @param string
......
423 423

  
424 424
   /**
425 425
    * Returns the help filename for a given algorithm
426
    * 
426
    *
427 427
    * @param alg
428 428
    *                the GeoAlgorithm
429 429
    * @param bForceCurrentLocale
430 430
    *                if true, returns the path to the current locale, even if it does not exist. If false, it will return the path
431 431
    *                corresponding to the default locale (english) in case the one corresponding to the current locale does not
432 432
    *                exist.
433
    * 
433
    *
434 434
    * @return the help filename for a given algorithm
435 435
    */
436 436
   //   public static String getHelpFilename(final GeoAlgorithm alg,
......
463 463
   //   }
464 464
   /**
465 465
    * Returns the path where help files for a given algorithm are found
466
    * 
466
    *
467 467
    * @param alg
468 468
    *                the GeoAlgorithm
469 469
    * @param bForceCurrentLocale
......
475 475
   public static String getHelpPath(final GeoAlgorithm alg,
476 476
                                    final boolean bForceLocale) {
477 477

  
478
      String sPackage = alg.getClass().getPackage().toString();
479
      sPackage = sPackage.substring(8);
478
      String sPackage = alg.getClass().getName();
479
      sPackage = sPackage.substring(0, sPackage.lastIndexOf("."));
480 480
      String sPath = SextanteGUI.getHelpPath() + File.separator + Locale.getDefault().getLanguage() + File.separator + sPackage;
481 481

  
482 482
      final File dir = new File(sPath);

Also available in: Unified diff