Revision: 10115
          http://sourceforge.net/p/languagetool/code/10115
Author:   dnaber
Date:     2013-05-18 09:43:58 +0000 (Sat, 18 May 2013)
Log Message:
-----------
tiny javadoc and code cleanup

Modified Paths:
--------------
    
trunk/languagetool/languagetool-gui-commons/src/main/java/org/languagetool/gui/Tools.java

Modified: 
trunk/languagetool/languagetool-gui-commons/src/main/java/org/languagetool/gui/Tools.java
===================================================================
--- 
trunk/languagetool/languagetool-gui-commons/src/main/java/org/languagetool/gui/Tools.java
   2013-05-18 09:06:32 UTC (rev 10114)
+++ 
trunk/languagetool/languagetool-gui-commons/src/main/java/org/languagetool/gui/Tools.java
   2013-05-18 09:43:58 UTC (rev 10115)
@@ -41,7 +41,7 @@
   private static final String MARKER_END = "</font></b>";
 
   private Tools() {
-    // no constructor
+    // no public constructor
   }
 
   public static String makeTexti18n(final ResourceBundle messages, final 
String key,
@@ -87,20 +87,13 @@
    * Get the context (<code>contextSize</code> characters) of the given text
    * range, highlighting the range with the given marker strings.
    * 
-   * @param fromPos
-   *          the start position of the error in characters
-   * @param toPos
-   *          the end position of the error in characters
-   * @param text
-   *          the text from which the context should be taken
-   * @param contextSize
-   *          the size of the context in characters
-   * @param markerStart
-   *          the string used to mark the beginning of the error
-   * @param markerEnd
-   *          the string used to mark the end of the error
-   * @param escapeHTML
-   *          whether HTML/XML characters should be escaped
+   * @param fromPos the start position of the error in characters
+   * @param toPos the end position of the error in characters
+   * @param text the text from which the context should be taken
+   * @param contextSize the size of the context in characters
+   * @param markerStart the string used to mark the beginning of the error
+   * @param markerEnd the string used to mark the end of the error
+   * @param escapeHTML whether HTML/XML characters should be escaped
    * @deprecated use {@link ContextTools}
    */
   public static String getContext(final int fromPos, final int toPos,
@@ -122,11 +115,7 @@
     final JFileChooser jfc = new JFileChooser();
     jfc.setFileFilter(fileFilter);
     jfc.showOpenDialog(frame);
-    final File file = jfc.getSelectedFile();
-    if (file == null) {
-      return null;
-    }
-    return file;
+    return jfc.getSelectedFile();
   }
 
   /**
@@ -139,8 +128,8 @@
   }
 
   /**
-   * Show the exception (message without stacktrace) in a dialog and print it 
to
-   * STDERR.
+   * Show the exception (message without stacktrace) in a dialog and print the
+   * stacktrace to STDERR.
    */
   static void showErrorMessage(final Exception e) {
     final String msg = e.getMessage();

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to