Revision: 14651
http://gate.svn.sourceforge.net/gate/?rev=14651&view=rev
Author: markagreenwood
Date: 2011-12-03 18:35:00 +0000 (Sat, 03 Dec 2011)
Log Message:
-----------
don't store known plugins from the user plugin dir in the config file as they
get enumerated automatically anyway
Modified Paths:
--------------
gate/trunk/src/gate/Gate.java
gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
Modified: gate/trunk/src/gate/Gate.java
===================================================================
--- gate/trunk/src/gate/Gate.java 2011-12-03 17:35:30 UTC (rev 14650)
+++ gate/trunk/src/gate/Gate.java 2011-12-03 18:35:00 UTC (rev 14651)
@@ -21,6 +21,7 @@
import gate.creole.ResourceData;
import gate.creole.metadata.CreoleResource;
import gate.event.CreoleListener;
+import gate.gui.creole.manager.PluginUpdateManager;
import gate.util.Benchmark;
import gate.util.Files;
import gate.util.GateClassLoader;
@@ -1031,6 +1032,16 @@
throw new GateRuntimeException(
"Problem while locating the plug-ins home!", ioe);
}
+
+ String userPluginHomeStr;
+ try {
+ File userPluginHome = PluginUpdateManager.getUserPluginsHome();
+ userPluginHomeStr = (userPluginHome != null ?
userPluginHome.getCanonicalPath() : null);
+ }
+ catch (IOException ioe) {
+ throw new GateRuntimeException("Unable to access user plugin
directory!", ioe);
+ }
+
// update the values for knownPluginPath
String knownPluginPath = "";
Iterator<URL> pluginIter = getKnownPlugins().iterator();
@@ -1042,6 +1053,9 @@
try {
if(pluginDirectory.getCanonicalPath().startsWith(pluginsHomeStr))
continue;
+
+ if (userPluginHomeStr != null &&
pluginDirectory.getCanonicalPath().startsWith(userPluginHomeStr))
+ continue;
}
catch(IOException ioe) {
throw new GateRuntimeException("Problem while locating the plug-in"
@@ -1721,7 +1735,7 @@
* The list of plugins (aka CREOLE directories) the system knows about. This
* list contains URL objects.
*/
- protected static List<URL> knownPlugins;
+ private static List<URL> knownPlugins;
/**
* The list of plugins (aka CREOLE directories) the system loads
automatically
Modified: gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
===================================================================
--- gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
2011-12-03 17:35:30 UTC (rev 14650)
+++ gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
2011-12-03 18:35:00 UTC (rev 14651)
@@ -436,6 +436,7 @@
}
if(updateSites.size() == 0) {
+ //TODO we need to change this to something more sensible
updateSites.add(new RemoteUpdateSite("Default Test Site", new URI(
"http://greenwoodma.servehttp.com/gate-plugins/"), true));
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs