- Timestamp:
- 2006-10-30T13:46:35+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java
r12808 r13182 81 81 getElementAt(i); 82 82 } 83 83 84 84 // Create the separator, cause we can reuse it. 85 85 separator = getSeparator(); 86 86 placeSeparator(); 87 // check for MetadataXMLPlug 88 ensureMetadataXMLPlugIsLoaded(); 87 89 // Listen for CollectionContentsChanged events, so we can give plugin hints when new files are added 88 90 Gatherer.c_man.addCollectionContentsChangedListener(this); 89 } 90 91 91 92 } 93 94 private void ensureMetadataXMLPlugIsLoaded() { 95 96 Plugin metaxmlplug = Plugins.getPlugin("MetadataXMLPlug", false); 97 if (metaxmlplug!= null) { 98 if (!contains(metaxmlplug)) { 99 // Create a new element in the DOM 100 Element new_plugin_element = CollectionConfiguration.createElement(StaticStrings.PLUGIN_ELEMENT); 101 new_plugin_element.setAttribute(StaticStrings.TYPE_ATTRIBUTE, metaxmlplug.getName()); 102 Plugin new_plugin = new Plugin(new_plugin_element, metaxmlplug); 103 assignPlugin(new_plugin); 104 } 105 } 106 } 92 107 /** Retrieve a list of the plugins that are available to be added to the collection. */ 93 108 private Object[] getAvailablePlugins() … … 311 326 /** We attempt to place the separator between the unfixed and the fixed plugins. Since we only know of two fixed plugins, we search for either of them, and place the separator before them. 312 327 */ 313 p ublicvoid placeSeparator() {328 private void placeSeparator() { 314 329 ///ystem.err.println("Placing separator."); 315 330 int separator_index = super.getSize(); … … 679 694 remove.setEnabled(false); 680 695 } 696 else if (plugin_name.equals(StaticStrings.METADATAXMLPLUG_STR)) { 697 remove.setEnabled(false); 698 } 699 681 700 else { 682 701 // don't let people remove special plugins such GAPlug an METSPlug,
Note:
See TracChangeset
for help on using the changeset viewer.