void saveProjectConf(String dir) throws IOException {
        StringBuilder b = new StringBuilder();
        for (int i = 0; i < tabs.getTabCount(); i++) {
            SimPanel t = (SimPanel) tabs.getComponentAt(i);
            if (t.getFile() != null) {
                if (b.length() != 0) {
                    b.append(";");
                }
                b.append(t.getFile().toString().substring(dir.length() + 1).replace('\\', '/'));
            }
        }

        int activeFile = tabs.getSelectedIndex() < 0 ? 0 : tabs.getSelectedIndex();

        File conf = new File(dir + File.separatorChar + OMS_DIR, PROJECT_PROPERTIES);
        
        String f = "";
        if (conf.exists()) {
            f = readFile(conf.toString());
        }

        if (f.indexOf(PREF_OPEN_FILES) > -1) {
            f = f.replaceFirst(PREF_OPEN_FILES + "\\s*=(.)*\n", PREF_OPEN_FILES + "=" + b.toString() + "\n");
        } else {
            f = f + "\n\n# OMS Console configuration:\n";
            f = f + PREF_OPEN_FILES + "=" + b.toString() + "\n";
        }
        if (f.indexOf(PREF_ACTIVE_FILE) > -1) {
            f = f.replaceFirst(PREF_ACTIVE_FILE + "\\s*=(.)*\n", PREF_ACTIVE_FILE + "=" + activeFile + "\n");
        } else {
            f = f + PREF_ACTIVE_FILE + "=" + activeFile + "\n";
        }
        
        conf.getParentFile().mkdirs();
        PrintWriter fo = new PrintWriter(conf);
        fo.print(f);
        fo.close();
    }