Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab/Space related preference should not be inherited from Java Editor. #1495

Closed
sbernard31 opened this issue Jul 21, 2023 · 2 comments
Closed

Comments

@sbernard31
Copy link

sbernard31 commented Jul 21, 2023

I'm using Groovy Editor to format my JenkinsFile and I want 2 spaces indentations.
But I want to keep my 4 spaces indentation for my java files.
I think for now this is impossible because :

Capture d’écran de 2023-07-21 10-42-04

@eric-milles
Copy link
Member

eric-milles commented Aug 6, 2023

Many preferences are shared with java tools, but the preferences are read from 3 places. So you can override any setting that is shared with a groovy-specific value. For example you can add a line to workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.codehaus.groovy.eclipse.ui.prefs

eclipse.preferences.version=1
...
org.eclipse.jdt.core.formatter.tabulation.size=8

The preference names are listed here: https://github.com/groovy/groovy-eclipse/blob/master/ide/org.codehaus.groovy.eclipse.refactoring/src/org/codehaus/groovy/eclipse/refactoring/PreferenceConstants.java#L61

@sbernard31
Copy link
Author

Thx it seems to work. 🙏

(Too bad there is no UI about it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants