GRECLIPSE

[formatting] Editor adds spaces instead of tabs for indenting when hitting enter to get to a new line while defining a List

Details

  • Type: Sub-task Sub-task
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.6
  • Fix Version/s: 2.0.2Release
  • Component/s: Formatting
  • Labels:
    None
  • Number of attachments :
    0

Description

If I write

def test = ["hello": "world",
"and": "sample"]

with the definition of the List spanning two lines, when I hit return to get to the second line, the editor adds spaces, not tabs, for indentation. I only use tabs for indentation, so this is definitely not nice

Issue Links

Activity

Hide
Andrew Eisenberg added a comment -

Made a change to GroovyIndenter and have addressed this problem. Should be available in the next dev build as well as the next release that will be out soon.

Show
Andrew Eisenberg added a comment - Made a change to GroovyIndenter and have addressed this problem. Should be available in the next dev build as well as the next release that will be out soon.
Hide
Jean-Noël Rivasseau added a comment -

Thanks for the fix!

I have a lot of formatting related bugs that I will also report then

Nice to see solid Eclipse support finally coming to Groovy (and I hope Grails soon too)

Show
Jean-Noël Rivasseau added a comment - Thanks for the fix! I have a lot of formatting related bugs that I will also report then Nice to see solid Eclipse support finally coming to Groovy (and I hope Grails soon too)
Hide
Jean-Noël Rivasseau added a comment -

This is not fixed, or at least not totally fixed...

If you have a Map spanning several lines, the problem is still there

model = ["view": g.render("template": "/editor/main", "model": ["currentLocale": currentLocale]),
"initialStyle": new File(design.obtainCSSFilePath()).getText(),
"generalStyle": new File("${org.codehaus.groovy.grails.commons.ConfigurationHolder.config.commonCssPath}customization.css").getText(),
"fonts": FontFamily.obtainFontsMap(), "notLogged": ! (session.MemberId as Boolean),
"noLogout": ! member.loginRequired, "sessionId": session.id, "basicMode": design.basicMode ]

Worst still, the level of indentation is wrong once you are after the list definition on a new line.

Show
Jean-Noël Rivasseau added a comment - This is not fixed, or at least not totally fixed... If you have a Map spanning several lines, the problem is still there model = ["view": g.render("template": "/editor/main", "model": ["currentLocale": currentLocale]), "initialStyle": new File(design.obtainCSSFilePath()).getText(), "generalStyle": new File("${org.codehaus.groovy.grails.commons.ConfigurationHolder.config.commonCssPath}customization.css").getText(), "fonts": FontFamily.obtainFontsMap(), "notLogged": ! (session.MemberId as Boolean), "noLogout": ! member.loginRequired, "sessionId": session.id, "basicMode": design.basicMode ] Worst still, the level of indentation is wrong once you are after the list definition on a new line.
Hide
Kris De Volder added a comment -

I believe the problem with tabs versus spaces usage should be resolved once my recent patches in GRE-631 and GRE-740 have been applied.

The problem relating to indentation after the ending "]" is a different issue: GRE-744. So, I'm resolving this issue and copying Jean Noel's latest example over to GRE-740.

Show
Kris De Volder added a comment - I believe the problem with tabs versus spaces usage should be resolved once my recent patches in GRE-631 and GRE-740 have been applied. The problem relating to indentation after the ending "]" is a different issue: GRE-744. So, I'm resolving this issue and copying Jean Noel's latest example over to GRE-740.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: