"Save All" operation not deploying all files that were saved

Issue #319 resolved
Tom Fuda created an issue

I've configured my "Validation and Deployment" settings as follows: [http://screencast.com/t/dy8Kk0qlM6b] because I decided I didn't want the IDE continuously trying to validate my changes on edit (I'm using the meta-data API for validation and deployment, and it is slow). You can see that I've configured things to deploy on save. Now, I'm editing both a Visualforce page and its Apex controller, such that both files have unsaved changes. When I use the Ctrl+S hotkey to "Save All", I'm observing that only the file that happens to have focus in the editor gets deployed to the server. This causes compilation errors for example, if I've added a new Visualforce expression to the page, but the bind variable doesn't exist in the controller because the controller changes didn't get deployed. I guess I'm expecting that "Save All" would save ALL files that have unsaved changes, and then deploy all of the modified files in one operation.

Comments (8)

  1. Scott Wells repo owner

    Tom, unfortunately I'm not able to hook into IntelliJ's own "Save All" functionality for this purpose. I've actually been explicitly instructed by the JetBrains folks not to mess with the way that works outside of registering simple listeners for save events. As a result, Ctrl+S handling is a convenience when editing a single file, but if you want to ensure that the broader project/module contents are deployed, you'll need to use IC's "Deploy All Metadata" and "Deploy Modified Metadata" actions which are available under the Build menu, context menu, and keyboard shortcuts. Please let me know if that doesn't provide the functionality that you're wanting.

  2. Scott Wells repo owner

    I'm going to resolve this since I can't really expand IC's role in Save All and have provided Deploy All/Modified Metadata actions.

  3. Tom Fuda Account Deactivated reporter

    Thanks for the quick response. Does IC's "Deploy Modified Metadata" action save files that unsaved edits first? If not, it sounds like I should be doing a "Save All", followed by a "Deploy Modified Metadata" action to cover the use case I mentioned of wanting to save and deploy both the Visualforce page and it's Apex controller in the same deployment package (and perhaps even turn off the implicit deploy on save behavior).

  4. Scott Wells repo owner

    Just so I understand, are you saying that there are problems with the new feature, or are you correlating the new feature with an existing issue tracker item? If there are problems with the new feature, would you mind logging a new issue with details on which operations don't seem to be saving properly? Thanks!

  5. Scott Wells repo owner

    Gotcha. Yes, I hadn't actually looked for an existing issue that might have corresponded to the enhancement. I just knew that I'd finally found a way to make Save All work the way people expected and wanted to get it into folks' hands!

  6. Log in to comment