Changeset 16295
- Timestamp:
- 2008-07-03T16:51:13+12:00 (15 years ago)
- Location:
- gli/trunk/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/cdm/Plugin.java
r15108 r16295 43 43 private boolean does_explode_metadata_databases = false; 44 44 private boolean does_replace_srcdocs_with_html = false; // to work with replace_srcdoc_with_html.pl 45 private boolean loading_options_failed = false; 45 /** Plugins are loaded as needed. This variable indicates 1. whether a plugin has been loaded already; 2. whether a 46 * plugin has been successfully loaded. When both are true, has_loaded_options will be true. */ 47 private boolean has_loaded_options = false; 46 48 47 49 /** Constructor used in DOMProxyListModel initializations, and Library Level. Used for Base plugins (those in the list of available plugins, not ones that are in the DOMProxyList) … … 84 86 85 87 86 public boolean didLoadingOptionsFail()87 { 88 return loading_options_failed;88 public boolean hasLoadedOptions() 89 { 90 return has_loaded_options; 89 91 } 90 92 … … 228 230 } 229 231 230 public void set LoadingOptionsFailed()231 { 232 this. loading_options_failed = true;232 public void setHasLoadedOptions(boolean hasLoadedOptions) 233 { 234 this.has_loaded_options = hasLoadedOptions; 233 235 } 234 236 } -
gli/trunk/src/org/greenstone/gatherer/greenstone/Plugins.java
r15111 r16295 83 83 // If we've found the plugin, load its arguments now, if required 84 84 if (plugin != null && arguments_required) { 85 if ( plugin.getArguments().size() == 0 && plugin.didLoadingOptionsFail() == false) {85 if (!plugin.hasLoadedOptions()) { 86 86 loadPluginInfo(plugin, collection_specific); 87 87 } … … 165 165 // Check the XML output was obtained successfully 166 166 if (pluginfo_xml == null || pluginfo_xml.length() == 0) { 167 plugin.set LoadingOptionsFailed();167 plugin.setHasLoadedOptions(false); // failure to load options 168 168 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_XML_Parse_Failed", plugin.getName()), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 169 169 return; 170 } else { 171 plugin.setHasLoadedOptions(true); 170 172 } 171 173 … … 243 245 Document document = XMLTools.parseXML(new StringReader(xml)); 244 246 if (document == null) { 245 plugin.set LoadingOptionsFailed();247 plugin.setHasLoadedOptions(false); // failure to load the options/failed plugin 246 248 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_XML_Parse_Failed", plugin.getName()), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 247 249 return; 250 } else { 251 plugin.setHasLoadedOptions(true); 248 252 } 249 253
Note:
See TracChangeset
for help on using the changeset viewer.