ide/src/wombat/util/files/DocumentManager.java
public static boolean Open() {
    	if (me == null) throw new RuntimeException("Document manager not initialized.");
    	
    	// Choose a file.
    	FileDialog fc = new FileDialog(me.Main, "Open...", FileDialog.LOAD);
        fc.setVisible(true);
        
        if (fc.getFile() == null)
            return false;
        
        // Sanity check.
        File file = new File(fc.getDirectory(), fc.getFile());
        if (!file.exists())
        {
        	ErrorManager.logError("Unable to load file (does not exist): " + fc.getFile());
            return false;
        }
        
        // Actually open it.
        return Open(file);
    }
/**
     * Load a file from a dialog.
     * @return If the load worked.
     */
Load a file from a dialog.
@return If the load worked.
Load a file from a dialog . @return If the load worked .
public static boolean Open() {
    	if (me == null) throw new RuntimeException("Document manager not initialized.");
    	FileDialog fc = new FileDialog(me.Main, "Open...", FileDialog.LOAD);
        fc.setVisible(true);
        if (fc.getFile() == null)
            return false;
        File file = new File(fc.getDirectory(), fc.getFile());
        if (!file.exists())
        {
        	ErrorManager.logError("Unable to load file (does not exist): " + fc.getFile());
            return false;
        }
        return Open(file);
    }
public static boolean Open ( ) { if ( me == null ) throw new RuntimeException ( "Document manager not initialized." ) ; FileDialog fc = new FileDialog ( me . Main , "Open..." , FileDialog . LOAD ) ; fc . setVisible ( true ) ; if ( fc . getFile ( ) == null ) return false ; File file = new File ( fc . getDirectory ( ) , fc . getFile ( ) ) ; if ( ! file . exists ( ) ) { ErrorManager . logError ( "Unable to load file (does not exist): " + fc . getFile ( ) ) ; return false ; } return Open ( file ) ; }
Load a file from a dialog.
Load a file from a dialog .
// Choose a file. // Sanity check. // Actually open it.