Logo Search packages:      
Sourcecode: jabref-plugin-oo version File versions  Download package

void net::sf::jabref::oo::StyleSelectDialog::addStyles ( String  dir,
boolean  recurse 
) [inline, private]

If the string dir indicates a file, parse it and add it to the list of styles if successful. If the string dir indicates a directory, parse all files looking like style files, and add them. The parameter recurse determines whether we should recurse into subdirectories.

dir the directory or file to handle.
recurse true indicates that we should recurse into subdirectories.

Definition at line 197 of file StyleSelectDialog.java.

References addSingleFile().

Referenced by readStyles().

        File dirF = new File(dir);
        if (dirF.isDirectory()) {
            File[] files = dirF.listFiles();
            for (int i = 0; i < files.length; i++) {
                File file = files[i];
                // If the file looks like a style file, parse it:
                if (!file.isDirectory() && (file.getName().endsWith(STYLE_FILE_EXTENSION))) {
                // If the file is a directory, and we should recurse, do:
                else if (file.isDirectory() && recurse) {
                    addStyles(file.getPath(), recurse);
        else {
            // The file wasn't a directory, so we simply parse it:

Generated by  Doxygen 1.6.0   Back to index