Cannot use IntelliJ's built-in CSV data table viewer along with files tracked by IC2

Issue #2041 resolved
Paweł Znamiec created an issue

IntelliJ Ultimate has an option to view CSV files in a convenient table view. I have some CSV files in static resources for test data and wanted to edit them, but I found out that when I click on "Data" tab on the bottom (where "Source" and "Metadata" tabs exist too) - nothing happens, no error message or anything. I can click only on “Source” and “Metadata” tabs.

However, CSV data viewer does work when there are no "Source" and "Metadata" tabs, so when a file isn’t tracked by IC2.

When it works, file tabs look like below.

When it doesn’t work, file tabs look like below.

Comments (13)

  1. Scott Wells repo owner

    This came in at a particularly serendipitous time as I had just wrapped up something in this area and it was simple to return to it to debug and fix the issue:

    Issue2041.png

    The fix will be included in the next released build, likely Thursday of this week.

  2. Aliaksandr Luferau

    Hi Scott Wells, please confirm that after this update it is any more not possible to save all modified apex classes as example when I press Ctrl+s in the IDEA? As example i execute some refactoring which changed several classes - previously all of them deployed at once when i press Ctrl+s but after last update only currently opened class deployed - so I need to manually select all modified classes and deploy them. Or I missed some new setting?

    there as example i modified 2 files and click Ctrl+s, but only 1 deployed - which is current

  3. Scott Wells repo owner

    Hi. Yes, that's correct. Please see the third and fourth entries in the release notes. The option in question here is the removed Deploy all modified files option which was never perfectly clear in its behavior and was quite tied to some strange underlying behavior in the host JetBrains IDE about which files would actually be saved. To accomplish the same thing after a change that affects multiple classes, you should use the Deploy Modified Metadata action which compares local filesystem timestamps to org timestamps and only deploys files which are newer (created or updated) relative to the org. You can find more details on that action (and other deployment actions) in the user guide topic.

    I hope that helps. Let me know if you have other questions or concerns.

  4. Aliaksandr Luferau

    That bad, but seems need to live with this.

    When i press Ctrl+Shift+Alt+F9 (key bindings for Deploy modified metadata) then opened window with selected to scope only current file - all other modified files just ignored. To use this logic need to move mouse to the project window and select folder classes - only then this feature works - but this is too many steps, instead of just press Ctrl+S as previously.

    It works pretty well for me, and why not to set it optional? So somebody will use it other not.

    Thanks.

  5. Scott Wells repo owner

    It was optional previously and would end up being enabled by users which would then lead to things either being deployed that those users did not want/expect to be deployed or the opposite...things that they did want/expect to be deployed would not be. This is because the underlying IDE decides which files to include in a save operation based on the relationship between editors and the associated on-disk files and whether they're out of sync. It's unintuitive and was leading to many, many questions and issues.

    When you start a a Deploy Modified Metadata action, the Contents drop-down is focused by default intentionally so that you can quickly change the value. Type M for Module or P for Project and then hit Enter to start the deployment. It should be very keyboard friendly. I understand that it's still three keystrokes instead of one for these types of multi-file deployments, but in my experience those are less common than the standard Ctrl/Cmd+S to save exactly the current file as part of ongoing development.

    What I do have on my backlog, though, is adding the ability to have Ctrl/Cmd+S behavior be configurable so that it either saves the current file or runs an immediate Deploy Modified Files on Project or Module scope with no intermediate dialog. I believe that would be a better way to provide what you're wanting because it's more definitive about what the behavior will be. I can't provide a concrete timeframe for that but will consider moving it forward given this recent change to provide similar (but more predictable) behavior to what was removed.

  6. Aliaksandr Luferau

    “Type M for Module“ - this doesn't work for me - it tries to really deploy everything despite only 2 classes being changed.

    As a workaround, I can not save editable files after refactoring, but manually select them in the project tree and deploy only them.

    So seems it is possible to continue using Illuminated plugin - only its behavior becomes so similar to the behavior of the visual code with the SF extension

  7. Scott Wells repo owner

    Something doesn't sound right. I just went through the following steps:

    1. Ran Deploy Modified Metadata on Module to ensure that everything is up-to-date. You can verify this by running that action again and it should say "Deployment Complete / All files are up-to-date."
    2. Used Refactor>Rename on a method that is used frequently in the code base, in this case CollectionUtil.isEmpty() was renamed to CollectionUtil.isEmptyX().
    3. Ran Deploy Modified Metadata on Module (which was already pre-selected since it was the last value I used for Contents) and it very quickly finished with "Deployment Complete / Deployed 6/6 components in <connectionName> in <duration> with status COMPLETED." Note that this project has hundreds of components and I can confirm that only the files affected by the rename operation were actually included in the deployment based on being detected as stale relative to the server.
    4. Just to be sure, ran Deploy Modified Metadata on Module (again, pre-selected) one more time and it again said "Deployment Complete / All files are up-to-date."
    5. I then reverted the rename and followed steps 2-4 above with the same results.

    If you're not seeing similar behavior, please log a separate bug (since this one is unrelated other than being delivered in the same update) and I'd like to see some deployment debug logs. Also be sure that you're running Deploy Modified Metadata and not Deploy All Metadata as the latter would do what you're describing...try to deploy everything covered by the selected Contents scope.

    And to be clear, this is the type of functionality that I'm planning to allow optionally on Ctrl/Cmd+S (in addition to unconditionally deploying the selected file(s), of course), likely in a pretty near-term release.

  8. Aliaksandr Luferau

    Thank you Scott. I found reason why it not works for me - due to substitution rules for Aura Components. On our project we have code style guide to use package prefix on the references to custom labels: so we replace Label.c. to Label.PackageNamespace. and this triggering deployment of all aura components each time. After this update about deployment process the substitution rules for retrieval not works any more as expected - because they trigger deployment.

  9. Scott Wells repo owner

    Hi. I'm not sure I follow as IC2 includes deployment/retrieval substitution rules as a first-class feature, and those are applied to only the files being deployed. That feature shouldn't change the set of files included in a deployment. I'm happy to discuss this further and figure out what's happening, but if you don't mind, let's please move out of this unrelated resolved issue and either into a new, dedicated issue or to the support email.

  10. Log in to comment