| Summary: | [preferences] Import formatter -> Not active | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Marvin Fröhlich <eclipse> | ||||||
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | daniel_megert | ||||||
| Version: | 3.8.1 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Marvin Fröhlich
Works for me using http://download.eclipse.org/eclipse/downloads/drops4/R-4.5-201506032000/ Created attachment 255348 [details]
INFOLOG Eclipse settings
I imported this into a fresh Mars workspace. And the formatter was selected, but not effective.
Please try again using the attached preferences. (In reply to Marvin Fröhlich from comment #2) > Created attachment 255348 [details] > INFOLOG Eclipse settings > > I imported this into a fresh Mars workspace. And the formatter was selected, > but not effective. I can reproduce it with those preferences. Really stange! If I use a preference file where I only have the formatter profile 'Strange' and Tabs switched to Spaces, it works! 1. start new workspace 2. paste this into the 'Package Explorer' public class C { void bug() { } } 3. Format ==> default formatting prefs with Tabs are used 4. import the 'strange.epf' 5. Format ==> spaces are used Is there something special in your preference file or in the formatter preferences? I suspect that during import an exception happens that gets swallowed. Even a restart doesn't fix the problem. Created attachment 255349 [details]
strange.epf
(In reply to Dani Megert from comment #4) > I suspect that during import an exception happens that gets > swallowed. Another reason for trouble could be the different profile version in the exported preferences. Noopur, please take a look if you have some spare time. I would check whether/how the settings are stored into the JDT Core preference store. Well, I guess, you would consider a lot of these settings "strange" or "special". We use the logical next-line-brace style, spaces instead of tabs and spaced parentheses. Nothing too special, I think. I set up this formatter using an Eclipse release some years back and never touched it again. The preferences were exported using Mars though. (comment #2) > Created attachment 255348 [details] > INFOLOG Eclipse settings This issue can be reproduced with Eclipse 3.8.1 also by using the attached profile. The difference between the two attached preference files which causes the bug is that the old file doesn't have any separate formatter entries like "/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter...". For Tab policy, the old file works properly if I add the following entry to it: /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.tabulation.char=space (In reply to Marvin Fröhlich from comment #7) > The preferences were exported using Mars though. If I export the preferences from Mars via File > Export > Preferences, I get those separate formatter entries like "/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter..." in the file, which are missing in your attached preferences file. Can you please specify the steps of how exactly you exported the preferences. Also, try to export the preferences again with plain Mars and check if you still don't get those entries in your file. I did some more testing and found that those extra entries are added in Mars only if you check "Export all" (which is checked by default) in the Export Preferences wizard page. If you check only "Java Code Style Preference" or check all preference types manually / using "Select All" button, then those entries are missing in the exported file and the bug can be reproduced on import. The above behavior can be seen in Eclipse 3.8.1 also. So looks like the bug is that those entries are not being added to exported file on checking only "Java Code Style Preference" or on checking all preference types manually / using "Select All" button. (In reply to Noopur Gupta from comment #11) > I did some more testing and found that those extra entries are added in Mars > only if you check "Export all" (which is checked by default) in the Export > Preferences wizard page. If you check only "Java Code Style Preference" or > check all preference types manually / using "Select All" button, then those > entries are missing in the exported file and the bug can be reproduced on > import. Good catch! *** This bug has been marked as a duplicate of bug 189804 *** |