Menu

#75 Don't use indent logic on non-Java files

open
nobody
5
2004-01-19
2002-06-20
No

If a saved document does not have a ".java" extension,
DrJava should not use the indent logic on it. This
would make it easy to open other files (eg. the
".drjava" config file) without starting another editor.
Note that the indent logic should still be applied on
new files (without any filename).

Discussion

  • Charles Reis

    Charles Reis - 2002-06-26
    • assigned_to: nobody --> csreis
     
  • Charles Reis

    Charles Reis - 2002-06-26

    Logged In: YES
    user_id=429731

    I've started work on this-- on the surface, it's really
    simple. The indentLine() method on DefinitionsDocument
    checks to see if the file is saved and ends in ".java"
    before applying the logic, unless a config option called
    INDENT_ALL_FILES is set to true. (That way you can still
    have DrJava indent non-Java files if you want to.) There
    can be some slight performance improvements in my approach
    (ie. caching the value of the config option), but I'm more
    concerned with the overall approach. We'd also probably
    like to disable colors, and heck, the entire reduced model
    while we're at it. I'll have to poke around to see if this
    is easy to do or of any use.

     
  • Peter Centgraf

    Peter Centgraf - 2003-01-22

    Logged In: YES
    user_id=431096

    What's the status of these changes? Is there anything we can use immediately for a small project, or should we start from scratch?

     
  • Charles Reis

    Charles Reis - 2004-01-19
    • assigned_to: csreis --> nobody
     
  • Charles Reis

    Charles Reis - 2004-01-19

    Logged In: YES
    user_id=429731

    I'm not sure where the prototype code for this is anymore, and I'm
    sure it's out of date by now. Any work on this should probably
    start from scratch (though I imagine it's still a small project).

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.