1 package org.columba.core.gui.externaltools; 17 18 import java.io.File ; 19 import java.net.MalformedURLException ; 20 import java.net.URL ; 21 22 import org.columba.core.base.OSInfo; 23 24 25 30 public class ASpellPlugin extends AbstractExternalToolsPlugin { 31 protected static File defaultLinux = new File ("/usr/bin/aspell"); 32 protected static File defaultLocalLinux = new File ("/usr/local/bin/aspell"); 33 protected static File defaultWin = new File ( 34 "C:\\Program Files\\Aspell\\bin\\aspell.exe"); 35 protected static URL websiteURL; 36 37 static { 38 try { 39 websiteURL = new URL ("http://aspell.sourceforge.net/"); 40 } catch (MalformedURLException mue) { 41 } 42 43 } 45 46 49 public ASpellPlugin() { 50 super(); 51 } 52 53 public String getDescription() { 54 return "<html><body><p>GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell.</p><p>It can either be used as a library or as an independent spell checker. Its main feature is that it does a much better job of coming up with possible suggestions than just about any other spell checker out there for the English language, including Ispell and Microsoft Word.</p></p>It also has many other technical enhancements over Ispell such as using shared memory for dictionaries and intelligently handling personal dictionaries when more than one Aspell process is open at once.</p></body></html>"; 56 } 57 58 public URL getWebsite() { 59 return websiteURL; 60 } 61 62 public File locate() { 63 66 if (OSInfo.isLinux() || OSInfo.isSolaris()) { 67 if (defaultLinux.exists()) { 68 return defaultLinux; 69 } else if (defaultLocalLinux.exists()) { 70 return defaultLocalLinux; 71 } 72 } 73 74 80 83 if (OSInfo.isWin32Platform() && defaultWin.exists()) { 84 return defaultWin; 85 } 86 87 90 return null; 91 } 92 } 93 | Popular Tags |