On Windows, using Leo trunk from a few days ago, I get "error: class
class does not end in a newline; one will be added [nl]" on what seems
to be every imported java chunk (java was the first an only thing I've
tried to import).

This issue seems to be line-ending related and I duplicated it with a
simple test.  When I run the following code from within a Leo node, I
get the same error as when I tried to import the file.

================================================
import leo.core.leoImport
i = leo.core.leoImport.leoImportCommands (c)

# Java code from org.apache.commons.lang.immutable (this shortened
form still duplicates the issue)
java = '''
public class MutableBoolean implements Mutable, Serializable, Comparable {

    /**
     * Required for serialization support.
     *
     * @see java.io.Serializable
     */
    private static final long serialVersionUID = -4830728138360036487L;

}

'''

# If the string has DOS line endings then I see warnings like:
# 'class class does not end in a newline; one will be added [nl]'
# Without the DOS line endings (i.e. comment out this line), no warning seen
java = java.replace("\n", "\r\n")

# Import the code to a child of the current one
p.insertAsLastChild()
p.moveToLastChild()

i.scanJavaText (java, p, atAuto=True)
c.redraw()

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to