How to change metadata selection after project creation?

Issue #55 resolved
Sergey Trusov created an issue

No description provided.

Comments (18)

  1. Scott Wells repo owner

    File>Project Structure, then Modules in the left nav. Expand the module for which you want to change selection and click on the Illuminated Cloud facet. Metadata selection is available under the General tab.

    I've considered adding a quicker way to access this for the current file's containing module. Let me know if you think that might be useful.

  2. Sergey Trusov reporter

    It doesn't work for me, I selected new metadata type and click Apply, but any changes in Project Structure.

  3. Scott Wells repo owner

    You also need to retrieve metadata after changing the selection. You can do that from Build>Illuminated Cloud>Retrieve Metadata and it should show you a comparison of the retrieved metadata according to that selection and your local source. Then you can choose which additional metadata you want to include in your module. Let me know if that doesn't address your issue.

  4. Scott Wells repo owner

    Interesting. Are you seeing IDEA's directory comparison tool once the progress dialog disappears? If not, is it perhaps sitting below the main IDEA window in z-order?

    What should happen when you click Retrieve Metadata is a progress dialog saying that it's retrieving the metadata and unpacking the archive, then it should show a two-pane view with the retrieved metadata on the left and your local source directory on the right. In that window you can choose to bring over whatever subset of metadata into your source directory you want. Once you close that window, IDEA/Illuminated Cloud should be updated to include that metadata.

    Let me know if that's not what you're seeing, and in particular please include anything from your idea.log while that process is running. If that's not getting us anywhere, what I'll do is instrument this operation with some additional logging for the next patch (I can get one out tonight with a few other fixes I already have ready) that can help me understand what's going on and why.

  5. Sergey Trusov reporter

    IDEA's directory comparison tool don't appear after Retrieve Metadata process is completed.

  6. Scott Wells repo owner

    Thanks for the info. If I can get one other piece of info from you, the version/build # of IDEA in which you've installed the plugin. I ask because there are notable differences in how the directory comparison tool works in IDEA 12 vs 13 vs 14. I'm pretty sure you're on IDEA 14 but just want to be sure.

    I'll add more logging to an updated build this evening and post it, then tell you how to enable the debugging info that I'll need to know why this is happening (or more specifically, isn't happening!). Then I'll just need a new idea.log excerpt from you with that debugging info in place.

  7. Scott Wells repo owner

    Sergey, I'm uploading 1.0.8 now that includes two things that I'm hoping help you out here. First, there was a slight bug in the way that I was inferring the IDEA module for each of the Build actions that might have been keeping the retrieve action from running at all for you depending on the current selection context. Now if the selected context (file, directory, etc.) isn't under an Illuminated Cloud module AND you only have one IC module in the product, the metadata associated with that module will be retrieved. Based on the log you attached, I'm wondering if the retrieve action ever even executed.

    Second, if for some reason the retrieve action is executing but just not showing the directory diff, I've added significantly more debug logging for diagnostic purposes. None of this logging will show any sensitive information from your project...just which actions are occurring, file counts, and temporary directories. To enable this debug logging, you go into Help>Configure Debug Log Settings and add the following line (note that the leading hash (#) is important):

    #com.illuminatedcloud.intellij.builder.ForceComBuilder
    

    After that if you run the retrieve action, you should see information in the log like:

    2015-07-14 20:59:59,230 [  23952]  DEBUG - tellij.builder.ForceComBuilder - Retrieving metadata for module default 
    2015-07-14 20:59:59,237 [  23959]  DEBUG - tellij.builder.ForceComBuilder - Creating a retrieve request for API version 34.0 
    2015-07-14 21:00:02,771 [  27493]  DEBUG - tellij.builder.ForceComBuilder - Retrieving all metadata for default/src/package.xml (6 items). 
    2015-07-14 21:00:02,772 [  27494]  DEBUG - tellij.builder.ForceComBuilder - Initializing the Force.com API client for connection dev 
    2015-07-14 21:00:14,007 [  38729]  DEBUG - tellij.builder.ForceComBuilder - Submitted retrieve request with async process ID 09S1a0000022QmgEAE 
    2015-07-14 21:00:14,007 [  38729]  DEBUG - tellij.builder.ForceComBuilder - Polling the status of the retrieve request. 
    2015-07-14 21:00:14,213 [  38935]  DEBUG - tellij.builder.ForceComBuilder - Status: InProgress 
    2015-07-14 21:00:14,213 [  38935]  DEBUG - tellij.builder.ForceComBuilder - Retrieve request is still processing. Waiting 5000 seconds and trying again. 
    2015-07-14 21:00:19,214 [  43936]  DEBUG - tellij.builder.ForceComBuilder - Polling the status of the retrieve request. 
    2015-07-14 21:00:19,655 [  44377]  DEBUG - tellij.builder.ForceComBuilder - Status: Succeeded 
    2015-07-14 21:00:19,655 [  44377]  DEBUG - tellij.builder.ForceComBuilder - Retrieve complete. 
    2015-07-14 21:00:20,008 [  44730]  DEBUG - tellij.builder.ForceComBuilder - Retrieved an archive of size 13041 bytes. 
    2015-07-14 21:00:20,016 [  44738]  DEBUG - tellij.builder.ForceComBuilder - Wrote retrieved archive to C:\Users\Scott\AppData\Local\Temp\default_fd162b2d_4cf4_4862_a767_04a2e58d069b0.zip 
    2015-07-14 21:00:20,076 [  44798]  DEBUG - tellij.builder.ForceComBuilder - Extracted retrieved archive to C:\Users\Scott\AppData\Local\Temp\default_fd162b2d_4cf4_4862_a767_04a2e58d069b0 
    2015-07-14 21:00:20,076 [  44798]  DEBUG - tellij.builder.ForceComBuilder - Removing intermediate 'unpackaged' directory. 
    2015-07-14 21:00:20,083 [  44805]  DEBUG - tellij.builder.ForceComBuilder - Removing archive file. 
    2015-07-14 21:00:20,084 [  44806]  DEBUG - tellij.builder.ForceComBuilder - Refreshing the virtual file system before applying retrieval substitution rules. 
    2015-07-14 21:00:20,201 [  44923]  DEBUG - tellij.builder.ForceComBuilder - Refreshing the virtual file system before comparison. 
    2015-07-14 21:00:20,376 [  45098]  DEBUG - tellij.builder.ForceComBuilder - Running directory diff on C:/Users/Scott/AppData/Local/Temp/default_fd162b2d_4cf4_4862_a767_04a2e58d069b0 and C:/Users/Scott/dev/projects/dev/default/src. 
    

    If you could send that subset of your idea.log, it would be very helpful.

    Let me know!

  8. Sergey Trusov reporter

    My log subset from idea.log

    #!
    
    2015-07-15 09:22:59,827 [  40084]  DEBUG - tellij.builder.ForceComBuilder - Retrieving metadata for module default 
    2015-07-15 09:22:59,830 [  40087]  DEBUG - tellij.builder.ForceComBuilder - Creating a retrieve request for API version 34.0 
    2015-07-15 09:22:59,831 [  40088]  DEBUG - tellij.builder.ForceComBuilder - Retrieving selected metadata  (4 items). 
    2015-07-15 09:22:59,832 [  40089]  DEBUG - tellij.builder.ForceComBuilder - Initializing the Force.com API client for connection Dev 
    2015-07-15 09:23:06,461 [  46718]  DEBUG - tellij.builder.ForceComBuilder - Submitted retrieve request with async process ID 09S240000010L0mEAE 
    2015-07-15 09:23:06,461 [  46718]  DEBUG - tellij.builder.ForceComBuilder - Polling the status of the retrieve request. 
    2015-07-15 09:23:06,617 [  46874]  DEBUG - tellij.builder.ForceComBuilder - Status: InProgress 
    2015-07-15 09:23:06,618 [  46875]  DEBUG - tellij.builder.ForceComBuilder - Retrieve request is still processing. Waiting 5000 seconds and trying again. 
    2015-07-15 09:23:11,618 [  51875]  DEBUG - tellij.builder.ForceComBuilder - Polling the status of the retrieve request. 
    2015-07-15 09:23:11,997 [  52254]  DEBUG - tellij.builder.ForceComBuilder - Status: Succeeded 
    2015-07-15 09:23:11,998 [  52255]  DEBUG - tellij.builder.ForceComBuilder - Retrieve complete. 
    2015-07-15 09:23:12,298 [  52555]  DEBUG - tellij.builder.ForceComBuilder - Retrieved an archive of size 20649 bytes. 
    2015-07-15 09:23:12,302 [  52559]  DEBUG - tellij.builder.ForceComBuilder - Wrote retrieved archive to C:\Users\UserName\AppData\Local\Temp\default_cca40694_d7e6_4d00_8fc5_e5b9caf6dc7c0.zip 
    2015-07-15 09:23:12,354 [  52611]  DEBUG - tellij.builder.ForceComBuilder - Extracted retrieved archive to C:\Users\UserName\AppData\Local\Temp\default_cca40694_d7e6_4d00_8fc5_e5b9caf6dc7c0 
    2015-07-15 09:23:12,354 [  52611]  DEBUG - tellij.builder.ForceComBuilder - Removing intermediate 'unpackaged' directory. 
    2015-07-15 09:23:12,356 [  52613]  DEBUG - tellij.builder.ForceComBuilder - Removing archive file. 
    2015-07-15 09:23:12,357 [  52614]  DEBUG - tellij.builder.ForceComBuilder - Refreshing the virtual file system before applying retrieval substitution rules. 
    2015-07-15 09:23:12,433 [  52690]  DEBUG - tellij.builder.ForceComBuilder - Refreshing the virtual file system before comparison. 
    2015-07-15 09:23:12,486 [  52743]  DEBUG - tellij.builder.ForceComBuilder - Initialized local source caches for 1 files in 43 ms. 
    

    As you can see above there is no info about running diff tool.

  9. Scott Wells repo owner

    Thanks very much, Sergey. That's very useful. Let me look at how that might happen and I'll get back to you soon.

  10. Scott Wells repo owner

    Sergey, I'm adding more debug logging to help get to the bottom of this. I have a suspicion as to what it might be based on going through the logic that might prevent the directory diff tool from showing. Do you have more than one source root configured for the Illuminated Cloud module by chance? The debug logging I'm adding will tell me whether that's the cause, but I wanted to share my thoughts here as well. If you do have more than one, the issue is that I don't know which source root to use for the right-hand side of the directory diff tool. Up to now I've just been silently omitting the directory comparison. With the new build that includes additional logging, I'm using the first listed source root and logging at showing a warning dialog to tell the user what's happening (as well as logging at the warning level). The user can then select an alternate path for the right-hand side if I've chosen the wrong source root.

    Once you get this new build, let me know your findings, and of course please provide the log extract for additional diagnostic purposes.

  11. Scott Wells repo owner

    Great! I'm going to resolve this. Let me know if you for some reason needed more than one source root. I've been thinking about reasons for that in an Illuminated Cloud project going forward and it's not hard to come up with several including segregation of product sources from test sources.

  12. Marc Paris

    I am encountering the same problem. I am using the IDEA 15 EAP 143.870.1. In the Project Structure Module, I select All/Package. I then Retrieve Metadata (Selected the Module and Dependencies) and then it it never shows directory comparison

  13. Log in to comment