Revision: 14810
          http://gate.svn.sourceforge.net/gate/?rev=14810&view=rev
Author:   markagreenwood
Date:     2011-12-20 08:49:29 +0000 (Tue, 20 Dec 2011)
Log Message:
-----------
get the directory from Gate properly -- might be overkill but at some point 
I'll want to check the PR as well as the parser

Modified Paths:
--------------
    
gate/trunk/plugins/Tagger_Measurements/test/src/gate/creole/measurements/MeasurementsTest.java

Modified: 
gate/trunk/plugins/Tagger_Measurements/test/src/gate/creole/measurements/MeasurementsTest.java
===================================================================
--- 
gate/trunk/plugins/Tagger_Measurements/test/src/gate/creole/measurements/MeasurementsTest.java
      2011-12-20 02:20:08 UTC (rev 14809)
+++ 
gate/trunk/plugins/Tagger_Measurements/test/src/gate/creole/measurements/MeasurementsTest.java
      2011-12-20 08:49:29 UTC (rev 14810)
@@ -9,6 +9,9 @@
 
 package gate.creole.measurements;
 
+import gate.Gate;
+import gate.util.GateException;
+
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -23,11 +26,13 @@
   private static MeasurementsParser parser;
   
   @Override
-  public void setUp() throws MalformedURLException, IOException  {
-    File baseDir = null;
-    if(System.getProperty("gate.measurements.plugin.dir") != null) {
-      baseDir = new File(System.getProperty("gate.measurements.plugin.dir"));
-    }
+  public void setUp() throws MalformedURLException, IOException, GateException 
 {
+    if (!Gate.isInitialised()) {
+      Gate.init();
+    }    
+    
+    File baseDir = new File(Gate.getPluginsHome(), "Tagger_Measurements");
+    
     parser = new MeasurementsParser((new File(baseDir, 
"resources/units.dat")).toURI().toURL(), new File(baseDir, 
"resources/common_words.txt").toURI().toURL());    
   }
 

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


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to