Changeset 10517


Ignore:
Timestamp:
2005-08-16T12:38:10+12:00 (19 years ago)
Author:
mdewsnip
Message:

Made some Gatherer variables and functions static, and removed the completely unnecessary "self" variable.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r10461 r10517  
    7373
    7474    /** All of the external applications that must exit before we close the Gatherer. */
    75     public Vector apps = new Vector();
     75    static private Vector apps = new Vector();
    7676    static private String non_standard_collect_directory_path = null;
    7777    static public String open_collection_file_path = null;
     
    8888    static private boolean g_man_built = false;
    8989
    90     /** A static reference to ourselves. */
    91     static public Gatherer self;
    9290    /** We are using the GLI for GS3 */
    9391    static public boolean GS3 = false;
     
    120118    public Gatherer(String[] args)
    121119    {
    122     this.self = this;
    123120    JarTools.initialise(this);
    124121
     
    468465     * @see org.greenstone.gatherer.gui.GUIManager
    469466     */
    470     public void exit()
     467    static public void exit()
    471468    {
    472469    System.err.println("In Gatherer.exit()...");
     
    629626     * @see org.greenstone.gatherer.Gatherer.ExternalApplication
    630627     */
    631     public void spawnApplication(File file) {
     628    static public void spawnApplication(File file) {
    632629    String [] commands = assoc_man.getCommand(file);
    633630    if(commands != null) {
     
    642639
    643640
    644     public void spawnApplication(String command)
     641    static public void spawnApplication(String command)
    645642    {
    646643    ExternalApplication app = new ExternalApplication(command);
     
    654651     * @see org.greenstone.gatherer.Gatherer.BrowserApplication
    655652     */   
    656     public void spawnBrowser(String url) {
     653    static public void spawnBrowser(String url) {
    657654    String command = assoc_man.getBrowserCommand(url);
    658655    if (command != null) {
     
    766763   
    767764    /** This private class contains an instance of an external application running within a JVM shell. It is important that this process sits in its own thread, but its more important that when we exit the Gatherer we don't actually System.exit(0) the Gatherer object until the user has volunteerily ended all of these child processes. Otherwise when we quit the Gatherer any changes the users may have made in external programs will be lost and the child processes are automatically deallocated. */
    768     private class ExternalApplication
     765    static private class ExternalApplication
    769766    extends Thread {
    770767    private Process process = null;
     
    827824    }
    828825    /** This private class contains an instance of an external application running within a JVM shell. It is important that this process sits in its own thread, but its more important that when we exit the Gatherer we don't actually System.exit(0) the Gatherer object until the user has volunteerily ended all of these child processes. Otherwise when we quit the Gatherer any changes the users may have made in external programs will be lost and the child processes are automatically deallocated. */
    829     private class BrowserApplication
     826    static private class BrowserApplication
    830827    extends Thread {
    831828    private Process process = null;
  • trunk/gli/src/org/greenstone/gatherer/LocalLibraryServer.java

    r8629 r10517  
    129129    // Spawn local library server process
    130130    String local_library_server_command = local_library_server_file.getAbsolutePath() + " " + gsdlsite_cfg_file.getSiteConfigFilename();
    131     Gatherer.self.spawnApplication(local_library_server_command);
     131    Gatherer.spawnApplication(local_library_server_command);
    132132
    133133    // Wait until program has started, by reloading and checking the URL field
  • trunk/gli/src/org/greenstone/gatherer/file/FileManager.java

    r10511 r10517  
    153153    }
    154154
    155     Gatherer.self.spawnApplication(file);
     155    Gatherer.spawnApplication(file);
    156156    }
    157157
  • trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java

    r10460 r10517  
    794794        Gatherer.c_man.getCollection().cdm.save(); // save the config file just in case
    795795        configureHomeURL();
    796         Gatherer.self.spawnBrowser(homepage);
     796        Gatherer.spawnBrowser(homepage);
    797797
    798798    }
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r10396 r10517  
    439439    // If we're running as an applet we don't quit here (we quit when the browser calls GathererApplet.destroy())
    440440    if (!Gatherer.isApplet) {
    441         Gatherer.self.exit();
     441        Gatherer.exit();
    442442    }
    443443    }
Note: See TracChangeset for help on using the changeset viewer.