Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350475 - [editor] JSDT auto format on save not working
Summary: [editor] JSDT auto format on save not working
Status: RESOLVED WORKSFORME
Alias: None
Product: JSDT
Classification: WebTools
Component: Web (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: Could be a dupe of bug 260463
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2011-06-27 13:42 EDT by Gabriel Petrovay CLA
Modified: 2014-07-24 04:44 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Petrovay CLA 2011-06-27 13:42:34 EDT
Hi,

I am using Indigo Classic + Eclipse Web Developer Tools on windows 7.

I have configured the save actions in the JSDT editor but no actions are taken whatsoever. No success as well after reopening the editor. (Colors work for eaxmple, so preferences are saved, conidered, etc).

I have configured both code formatting and additional rules (use always block for if's, trim trailing spaces, etc.).

Is this a known problem?
Comment 1 Ian Tewksbury CLA 2011-06-27 13:45:45 EDT
Are you referring to saving JS files or HTML/JSP pages that have JS in them?
Comment 2 Nitin Dahyabhai CLA 2011-06-27 14:20:42 EDT
None of the save actions take effect unless your file is in a Source Folder of a JavaScript Project (just like with JDT).  Where was the file?
Comment 3 Nitin Dahyabhai CLA 2011-06-30 16:17:22 EDT
Gabriel?
Comment 4 Nitin Dahyabhai CLA 2011-09-01 10:51:08 EDT
Works as expected in JavaScript projects.
Comment 5 Neale Upstone CLA 2014-07-24 04:44:13 EDT
See bug 260463.  If you've got here because you're having the same problem, then it may be because Eclipse lets to edit the save actions via the context menu of a .js file, but then does not apply all the preferences it lets you set.

Save actions it would seem, requires Configure -> Convert to JavaScript project.