Changeset 4686
- Timestamp:
- 2003-06-16T12:05:19+12:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r4682 r4686 185 185 // We set the closing thread, as it should be the only one who can actually see the collection is closed, at least until the closing thread expires. 186 186 closing_thread = Thread.currentThread(); 187 // System.err.println("Closing collection...");187 ///ystem.err.println("Closing collection..."); 188 188 // Remove the lock on this file, then remove the collection. 189 189 File lock_file = new File(Utility.getCollectionDir(Gatherer.config.gsdl_path) + collection.getName() + File.separator + LOCK_FILE); … … 196 196 Gatherer.config.setCollectionConfiguration(null); 197 197 Gatherer.g_man.collectionChanged(false); 198 // System.err.println("Closed collection.");198 ///ystem.err.println("Closed collection."); 199 199 // All of the consequences of a close should have been processed by now, so others should now see the collection as non-ready. 200 200 closing_thread = null; … … 796 796 // Open the collection file 797 797 collection = new Collection(collection_file); 798 // System.err.println("In CollectionManager::loadCollection(), collection: " + collection);798 ///ystem.err.println("In CollectionManager::loadCollection(), collection: " + collection); 799 799 collection.msm = new MetadataSetManager(); 800 800 msm = collection.msm; // Legacy … … 812 812 } 813 813 result = true; 814 // System.err.println("Done loadCollection().");814 ///ystem.err.println("Done loadCollection()."); 815 815 } catch (Exception error) { 816 816 // There is obviously no existing collection present. -
trunk/gli/src/org/greenstone/gatherer/file/FileNode.java
r4675 r4686 250 250 String collection_name = Gatherer.c_man.getCollection().getName(); 251 251 for(int j = 0; j < files.length; j++) { 252 System.err.println("Does " + files[j].getName() + " equal " + collection_name + "?");252 ///ystem.err.println("Does " + files[j].getName() + " equal " + collection_name + "?"); 253 253 if(files[j].getName().equals(collection_name) || files[j].getName().equals("modelcol")) { 254 254 // Remove the offending directory -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r4683 r4686 676 676 677 677 public void run() { 678 // System.err.println("Running CreationTask...");678 ///ystem.err.println("Running CreationTask..."); 679 679 if(ncm_prompt == null) { 680 680 Gatherer.c_man.createCollection(ncd_prompt.getDescription(), ncd_prompt.getEmail(), ncd_prompt.getName(), ncd_prompt.getTitle(), ncd_prompt.getBase(), null); -
trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPane.java
r4675 r4686 873 873 */ 874 874 public void valueChanged(TreeSelectionEvent event) { 875 // System.err.println("\n(MEP) valueChanged(TreeSelectionEvent)...");875 ///ystem.err.println("\n(MEP) valueChanged(TreeSelectionEvent)..."); 876 876 877 877 // Don't bother if this isn't the selected view -
trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r4675 r4686 62 62 public OpenCollectionDialog(File file) { 63 63 super(file); 64 System.err.println("Size = " + getSize());64 ///ystem.err.println("Size = " + getSize()); 65 65 // Other initialization 66 66 setAcceptAllFileFilterUsed(false); -
trunk/gli/src/org/greenstone/gatherer/gui/OptionsPane.java
r4675 r4686 628 628 } 629 629 } catch (FileNotFoundException fnfe) { 630 System.err.println("Error: log file not found: "+ this.file.toString());630 Gatherer.println("Error: log file not found: "+ this.file.toString()); 631 631 return ""; 632 632 } catch (IOException ioe) { 633 System.err.println("Error: exception occurred when trying to read in file "+this.file.toString()+", "+ioe.getMessage());633 Gatherer.println("Error: exception occurred when trying to read in file "+this.file.toString()+", "+ioe.getMessage()); 634 634 635 635 } -
trunk/gli/src/org/greenstone/gatherer/gui/table/GTableModel.java
r4668 r4686 289 289 if(0 <= row && row < current_metadata.size()) { 290 290 Metadata entry = (Metadata) current_metadata.get(row); 291 // System.err.println("Of the " + file_nodes.length + " selected files, " + entry + " is attached to " + entry.getCount() + " of them.");291 ///ystem.err.println("Of the " + file_nodes.length + " selected files, " + entry + " is attached to " + entry.getCount() + " of them."); 292 292 if (entry.getCount() == file_nodes.length) { 293 293 return true; … … 314 314 } 315 315 316 // System.err.println("\nBuilding metadata model...");316 ///ystem.err.println("\nBuilding metadata model..."); 317 317 Vector elements = Gatherer.c_man.getCollection().msm.getElements(); 318 318 ArrayList known_elements = new ArrayList(); … … 321 321 for (int i = 0; i < file_nodes.length && !killed; i++) { 322 322 File current_file = file_nodes[i].getFile(); 323 // System.err.println("File " + i + " (of " + file_nodes.length + "): " + current_file);323 ///ystem.err.println("File " + i + " (of " + file_nodes.length + "): " + current_file); 324 324 325 325 // Get the currently assigned metadata for this file … … 328 328 Metadata metadatum = (Metadata) metadata.get(j); 329 329 ElementWrapper element = metadatum.getElement(); 330 // System.err.println(" Metadatum: " + metadatum + " (" + metadatum.getCount() + ")");330 ///ystem.err.println(" Metadatum: " + metadatum + " (" + metadatum.getCount() + ")"); 331 331 332 332 // Ignore hidden metadata … … 361 361 for (int i = 0; i < elements.size() && !killed; i++) { 362 362 ElementWrapper element = (ElementWrapper) elements.get(i); 363 // System.err.println("Element: " + element);363 ///ystem.err.println("Element: " + element); 364 364 365 365 // If we haven't seen this metadata element, add it now -
trunk/gli/src/org/greenstone/gatherer/help/ContentModel.java
r4365 r4686 30 30 import java.util.HashMap; 31 31 import javax.swing.tree.DefaultTreeModel; 32 import org.greenstone.gatherer.Gatherer; 32 33 import org.greenstone.gatherer.cdm.CommandTokenizer; 33 34 import org.greenstone.gatherer.help.HelpItem; … … 106 107 } 107 108 catch (Exception error) { 108 System.err.println("Cannot build help contents. Possible error in index.txt");109 error.printStackTrace();109 Gatherer.println("Cannot build help contents. Possible error in index.txt"); 110 Gatherer.printStackTrace(error); 110 111 } 111 112 } -
trunk/gli/src/org/greenstone/gatherer/shell/GImportProgressMonitor.java
r4364 r4686 162 162 num_dirs = Gatherer.c_man.getCollection().getFolderCount(); 163 163 progress_bar.setValue(MIN); 164 System.err.println("Number of directories is " + num_dirs);164 Gatherer.println("Number of directories is " + num_dirs); 165 165 } 166 166 /** This method indicates the process is complete. -
trunk/gli/src/org/greenstone/gatherer/undo/UndoManager.java
r4675 r4686 436 436 break; 437 437 default: 438 System.err.println("Unknown code.");438 ///ystem.err.println("Unknown code."); 439 439 } 440 440 } -
trunk/gli/src/org/greenstone/gatherer/util/DragGroup.java
r4674 r4686 148 148 public void setSource(DragTree drag_source) { 149 149 this.drag_source = drag_source; 150 System.err.println("The drag source is now " + drag_source);150 ///ystem.err.println("The drag source is now " + drag_source); 151 151 } 152 152 } -
trunk/gli/src/org/greenstone/gatherer/util/Generator.java
r4674 r4686 97 97 98 98 public void out(String msg) { 99 System.err.println(msg);99 ///ystem.err.println(msg); 100 100 try { 101 101 if(file_output_stream == null) { … … 106 106 catch(Exception error) { 107 107 error.printStackTrace(); 108 System. err.println("An error has occured. View output.txt for more information.");108 System.out.println("An error has occured. View output.txt for more information."); 109 109 exit(); 110 110 } … … 112 112 113 113 static public void main(String args[]) { 114 System. err.println("Rapid repeated HTML generation tool.");115 System. err.println(" written by John Thompson, 2002\n");114 System.out.println("Rapid repeated HTML generation tool."); 115 System.out.println(" written by John Thompson, 2002\n"); 116 116 boolean usage = false; 117 117 // Attempt to generate html from text … … 132 132 // Print usage message 133 133 if(usage) { 134 System. err.println("Usage: GenHelp <text_file> <template_file>");135 System. err.println("text_file - A file containing text marked up using special tags.");136 System. err.println("template_file - An HTML file using tags to specify where to insert text.");134 System.out.println("Usage: GenHelp <text_file> <template_file>"); 135 System.out.println("text_file - A file containing text marked up using special tags."); 136 System.out.println("template_file - An HTML file using tags to specify where to insert text."); 137 137 } 138 138 } … … 351 351 catch (Exception error) { 352 352 error.printStackTrace(); 353 System. err.println("An error has occured. View output.txt for more information.");353 System.out.println("An error has occured. View output.txt for more information."); 354 354 exit(); 355 355 } … … 431 431 catch (Exception error) { 432 432 error.printStackTrace(); 433 System. err.println("An error has occured. View output.txt for more information.");433 System.out.println("An error has occured. View output.txt for more information."); 434 434 exit(); 435 435 } -
trunk/gli/src/org/greenstone/gatherer/util/TreeModelTest.java
r4674 r4686 41 41 /** Testing - usage message. */ 42 42 static void printUsage() { 43 System. err.println("Usage: java Test3 [-safe] [-debug]");44 System. err.println(" safe - use SynchronizedTreeModel");45 System. err.println(" debug - write debug messages to debug.txt file\n");46 System. err.println("Actions:");47 System. err.println(" 'Add Node' - Adds a new node to the selected node. Since this happens on the AWTEvent Thread it should always be safe.");48 System. err.println(" 'Remove Node' - Removes the selected node. Since this happens on the AWTEvent Thread it should always be safe.");49 System. err.println(" 'Preset Structure' - Generates a small preset structure on a seperate (dangerous) thread.");50 System. err.println(" 'Dangerous' - The ultimate test. Hammers the model with incessant random mutations from a separate thread.");43 System.out.println("Usage: java Test3 [-safe] [-debug]"); 44 System.out.println(" safe - use SynchronizedTreeModel"); 45 System.out.println(" debug - write debug messages to debug.txt file\n"); 46 System.out.println("Actions:"); 47 System.out.println(" 'Add Node' - Adds a new node to the selected node. Since this happens on the AWTEvent Thread it should always be safe."); 48 System.out.println(" 'Remove Node' - Removes the selected node. Since this happens on the AWTEvent Thread it should always be safe."); 49 System.out.println(" 'Preset Structure' - Generates a small preset structure on a seperate (dangerous) thread."); 50 System.out.println(" 'Dangerous' - The ultimate test. Hammers the model with incessant random mutations from a separate thread."); 51 51 System.exit(0); 52 52 } -
trunk/gli/src/org/greenstone/gatherer/valuetree/GValueModel.java
r4582 r4686 111 111 } 112 112 value_node = new GValueNode(new_subject); 113 // System.err.println("(GValueModel) addValue()... " + value_node);113 ///ystem.err.println("(GValueModel) addValue()... " + value_node); 114 114 115 115 // Figure out where this node will be inserted in subjects … … 130 130 ///ystem.err.println("Inserting '" + value + "' at position " + position); 131 131 insertNodeInto(value_node, subject, position); 132 // System.err.println("(GValueModel) Done insert node into...");132 ///ystem.err.println("(GValueModel) Done insert node into..."); 133 133 // SynchronizedTreeModelTools.insertNodeInto(this, subject, value_node); 134 134 // Inform listeners that we've changed. -
trunk/gli/src/org/greenstone/gatherer/valuetree/GValueTree.java
r4543 r4686 169 169 public void setSelectedMetadataElement(ElementWrapper element) 170 170 { 171 // System.err.println("Setting selected metadata element to: " + element);171 ///ystem.err.println("Setting selected metadata element to: " + element); 172 172 if (element == null) { 173 173 selected_metadata_element = null; … … 229 229 // Setting the text of the field causes the DocumentListener to be notified, and 230 230 // updating the tree is handled there (DocumentListenerImpl::validate()) 231 // System.err.println("Setting selected value to: " + val);231 ///ystem.err.println("Setting selected value to: " + val); 232 232 if (!card_showing.equals(NONE)) { 233 233 manual_text_edit_event = val.equals(""); // Set to false unless val == "" … … 333 333 { 334 334 String value_text = value.getText(); 335 // System.err.println("\n(Validate) Value text: " + value_text);335 ///ystem.err.println("\n(Validate) Value text: " + value_text); 336 336 337 337 // Ignore the validate() with empty text that occurs when value.setText() is used
Note:
See TracChangeset
for help on using the changeset viewer.