Hi, 

I'm using @auto to import java files into my Leo project. I'm then cloning 
various methods as sub-nodes of new feature nodes. 
It's helping keep my development focussed - and is useful to look back and 
see what parts of the codebase I've worked on for each feature. 

However, the whitespace in the Java files isn't completely regular. In 
particular, debug logging is always placed in column 1 - regardless of the 
surrounding indentation. 
Other people are also working on these files, so I'd rather not mess with 
the established convention. 

As things stand, when Leo imports a file its outputting a bunch of error 
messages:
* error: underindented line. Extra leading whitespace will be added
* warning: intermixed blanks and tabs

The creation of the auto node goes fine - though the final result has an 
@ignore directive in its root node. 
When working, I just take the @ignore away and clone the methods I want to 
work on. 
The problem is when I close the Leo file and re-open it later on, the same 
errors occur during the building of the auto node and the previous cloned 
information is lost. 
To restart work on a feature, I need to reclone the appropriate nodes. Not 
a showstopper, but not ideal. 

I tried adjusting the info in the JavaScanner class in the core 
leoImport.py file as follows:

        self.blockCommentDelim1 = '/*'
        self.blockCommentDelim2 = '*/'
        self.blockDelim1 = '{'
        self.blockDelim2 = '}'
        self.lineCommentDelim = '//'
        self.lineCommentDelim2 = None
        self.outerBlockDelim1 = '{'
        self.outerBlockDelim2 = '}'
        self.classTags = ['class','interface']
        self.functionTags = []
        self.sigFailTokens = [';','='] # Just like c.
        self.strict=False

I deleted the pyc file and restarted Leo. A new pyc file appears, so the 
compiled to bytecode seems to be ok.

I was hoping the the setting of self.strict = False would allow the parsing 
to ignore the whitespace and indentation issues. 
I'm still getting the same errors though. 

Any help appreciated. I'm using Leo 4.10-final. 

Thanks,
Eoin



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


Reply via email to