Revision: 19588 http://sourceforge.net/p/gate/code/19588 Author: markagreenwood Date: 2016-09-20 07:15:27 +0000 (Tue, 20 Sep 2016) Log Message: ----------- license headers and some minor object refactoring
Modified Paths: -------------- gate/branches/sawdust2/gate-core/src/main/java/gate/Main.java gate/branches/sawdust2/gate-core/src/main/java/gate/Plugin.java gate/branches/sawdust2/gate-core/src/main/java/gate/util/persistence/PersistenceManager.java Modified: gate/branches/sawdust2/gate-core/src/main/java/gate/Main.java =================================================================== --- gate/branches/sawdust2/gate-core/src/main/java/gate/Main.java 2016-09-20 07:13:57 UTC (rev 19587) +++ gate/branches/sawdust2/gate-core/src/main/java/gate/Main.java 2016-09-20 07:15:27 UTC (rev 19588) @@ -239,7 +239,7 @@ public void run(){ try{ File sessionFile = Gate.getUserSessionFile(); - if(sessionFile.exists()){ + if(sessionFile != null && sessionFile.exists()){ MainFrame.lockGUI("Loading saved session..."); PersistenceManager.loadObjectFromFile(sessionFile); } Modified: gate/branches/sawdust2/gate-core/src/main/java/gate/Plugin.java =================================================================== --- gate/branches/sawdust2/gate-core/src/main/java/gate/Plugin.java 2016-09-20 07:13:57 UTC (rev 19587) +++ gate/branches/sawdust2/gate-core/src/main/java/gate/Plugin.java 2016-09-20 07:15:27 UTC (rev 19588) @@ -1,3 +1,17 @@ +/* + * Plugin.java + * + * Copyright (c) 2016, The University of Sheffield. See the file + * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt + * + * This file is part of GATE (see http://gate.ac.uk/), and is free + * software, licenced under the GNU Library General Public License, + * Version 3, June 2007 (in the distribution as file licence.html, + * and also available at http://gate.ac.uk/gate/licence.html). + * + * Mark A. Greenwood, 3rd April 2016 + */ + package gate; import java.io.File; @@ -95,8 +109,7 @@ */ protected transient Set<Plugin> requiredPlugins = null; - public abstract org.jdom.Document getCreoleXML() throws Exception, - JDOMException; + public abstract org.jdom.Document getCreoleXML() throws Exception; public abstract String getName(); @@ -434,7 +447,7 @@ return true; } - private static Settings loadMavenSettings() throws SettingsBuildingException { + protected static Settings loadMavenSettings() throws SettingsBuildingException { // http://stackoverflow.com/questions/27818659/loading-mavens-settings-xml-for-jcabi-aether-to-use SettingsBuildingRequest settingsBuildingRequest = new DefaultSettingsBuildingRequest(); @@ -548,7 +561,7 @@ private static DefaultRepositorySystemSession repoSystemSession = null; - private static RepositorySystem getRepositorySystem() { + protected static RepositorySystem getRepositorySystem() { if(repoSystem != null) return repoSystem; DefaultServiceLocator locator = @@ -563,7 +576,7 @@ return repoSystem; } - private static RepositorySystemSession getRepositorySession() { + protected static RepositorySystemSession getRepositorySession() { if(repoSystemSession != null) return repoSystemSession; repoSystemSession = MavenRepositorySystemUtils.newSession(); Modified: gate/branches/sawdust2/gate-core/src/main/java/gate/util/persistence/PersistenceManager.java =================================================================== --- gate/branches/sawdust2/gate-core/src/main/java/gate/util/persistence/PersistenceManager.java 2016-09-20 07:13:57 UTC (rev 19587) +++ gate/branches/sawdust2/gate-core/src/main/java/gate/util/persistence/PersistenceManager.java 2016-09-20 07:15:27 UTC (rev 19588) @@ -1207,9 +1207,11 @@ Gate.getCreoleRegister().registerPlugin((Plugin)anUrl, false); } catch(GateException ge) { - Err.prln("Could not reload creole directory " - + ((URL)anUrl).toExternalForm()); + System.out.println("We've hit an error!"); + ge.printStackTrace(); ge.printStackTrace(Err.getPrintWriter()); + Err.prln("Could not reload creole directory "+ anUrl); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ GATE-cvs mailing list GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs