Revision: 15254
          http://gate.svn.sourceforge.net/gate/?rev=15254&view=rev
Author:   markagreenwood
Date:     2012-01-29 16:51:06 +0000 (Sun, 29 Jan 2012)
Log Message:
-----------
fixed a bug that would cause any dynamically loaded ready made apps that appear 
on the ANNIE, OpenNLP or LingPipe menus to be duplicated each time the menu was 
displayed

Modified Paths:
--------------
    gate/trunk/src/gate/gui/MainFrame.java

Modified: gate/trunk/src/gate/gui/MainFrame.java
===================================================================
--- gate/trunk/src/gate/gui/MainFrame.java      2012-01-29 13:54:56 UTC (rev 
15253)
+++ gate/trunk/src/gate/gui/MainFrame.java      2012-01-29 16:51:06 UTC (rev 
15254)
@@ -5073,23 +5073,22 @@
       super("Ready Made Applications");
       setIcon(new ReadyMadeIcon(24, 24));
       
-      final XJMenu annie = new XJMenu("ANNIE");
-      annie.add(new XJMenuItem(new LoadApplicationAction("ANNIE",
+      
+      final XJMenuItem annie = new XJMenuItem(new 
LoadApplicationAction("ANNIE",
           "annie-application", new File(new File(Gate.getPluginsHome(),
               ANNIEConstants.PLUGIN_DIR), ANNIEConstants.DEFAULT_FILE)),
-          MainFrame.this));
+          MainFrame.this);
       
-      final XJMenu lingPipe = new XJMenu("LingPipe");
-      lingPipe.add(new XJMenuItem(new LoadApplicationAction("LingPipe IE 
System",
+      final XJMenuItem lingPipe = new XJMenuItem(new 
LoadApplicationAction("LingPipe IE System",
           new File(new File(Gate.getPluginsHome(), "LingPipe"),
-              "resources/lingpipe.gapp")), MainFrame.this));
+              "resources/lingpipe.gapp")), MainFrame.this);
 
-      final XJMenu openNLP = new XJMenu("OpenNLP");
+      
 
-      openNLP.add(new XJMenuItem(
+      final XJMenuItem openNLP = new XJMenuItem(
           new LoadApplicationAction("OpenNLP IE System", new File(new File(Gate
               .getPluginsHome(), "OpenNLP"), "resources/opennlp.gapp")),
-          MainFrame.this));
+          MainFrame.this);
 
       addMenuListener(new MenuListener() {
         
@@ -5099,10 +5098,18 @@
           
           removeAll();
           
-          add(annie);
-          add(lingPipe);
-          add(openNLP);
+          XJMenu menu = new XJMenu("ANNIE");
+          menu.add(annie);
+          add(menu);
           
+          menu = new XJMenu("LingPipe");
+          menu.add(lingPipe);
+          add(menu);
+                    
+          menu = new XJMenu("OpenNLP");
+          menu.add(openNLP);
+          add(menu);
+          
           Set<String> toolTypes = 
Gate.getCreoleRegister().getApplicationTypes();
           for(String type : toolTypes) {
             List<Resource> instances = Gate.getCreoleRegister()

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


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to