if (idx.equals("inv")) { printParam(p, "position", "0"); }
    private boolean writeParams()    {        File f = new File(paramFileName);        PrintWriter p;        try            {                p = new PrintWriter(new FileWriter(f));            }        catch (IOException e)            {                // fix this to rethrow?                showException(e);                return false;            }        p.println("<parameters>");        messages.append("<parameters>\n");        String idx = encodeIdx();        String idxname = removeExt(iname.getText());        printParam(p, "index", idxname);        printParam(p, "indexType", idx);        if (idx.equals("inv"))            {                printParam(p, "position", "0");            }        if (doDM.isSelected())            {                // needs filter to valid values                if (DMnum == 0)                    printParam(p, "manager", idxname + DMNAME);                else                    printParam(p, "manager", idxname + DMNAME + Integer.toString(DMnum));                // needs filter to valid values.                printParam(p, "managerType", encodeDM());            }        if (doStem.isSelected())            {                String stemmer = (String)stemmers.getSelectedItem();                printParam(p, "stemmer", stemmer);                if (stemmer.equals("arabic"))                    {                        printParam(p, "arabicStemFunc",                                   (String) stemFuncs.getSelectedItem());                    }            }        printParam(p, "countStopWords", countStops.isEnabled() ? "true" : "false");        printParam(p, "memory", encodeMem());        // stopwords        if (doStop.isSelected())            {                printParam(p, "stopwords", stopwordlist.getText());            }        // acronyms        if (doAcro.isSelected())            {                printParam(p, "acronyms", acroList.getText());            }        // docFormat        printParam(p, "docFormat", (String)docFormat.getSelectedItem());        printParam(p, "dataFiles", dataFilesName );        p.println("</parameters>");        messages.append("</parameters>\n");        p.close();        return writeDataFiles();    }