Pulling sources for Lightning App / Components (or pretty much anything - Apex, VF, etc)

524 views
Skip to first unread message

cory....@zpaper.com

unread,
May 20, 2016, 11:09:36 AM5/20/16
to Illuminated Cloud Q&A
I'm a long-time intelliJ user and have been developing (off-and-on) for Salesforce since about 2010. I've just started to get up to speed on creating Lightning Components and Apps. I've gotten tired of developing my app in Developer Console and am looking for a better way. I found the Illuminated Cloud plug-in and have decided to give it a try.

I've created my first project and based it on a Salesforce sandbox account that I have. When creating the project, under Subscription, I selected all of the AuraDefinitionBundle entries that were available, all of the Apex stuff, along with probably a bunch of stuff that I don't really need. After I first created the project, I received an error message that said I needed to generate the offline symbol table and something about using an Illuminated Cloud API. I clicked the "Resolve" link and the offline symbol table was generated but I never could figure out how I would use the Illuminated Cloud API or why I would need to. After I closed the project and re-opened, I didn't receive the error dialog any more so I assume everything was taken care of.

However, I can't seem to pull down any of the source code for my Aura/Lightning Apps/Components, nor any of my Apex code or VF pages, or for that matter anything. I can look at the .cls file for an Apex class that I created in my sandbox org but it looks like it is just some file pulled from the offline symbol table or something - it contains all of the methods but they are all empty.

So my question is pretty basic: how do I pull down the source code for the stuff that I've created in Salesforce and want to work on in intelliJ?

Thanks.

Scott

unread,
May 20, 2016, 1:56:30 PM5/20/16
to Illuminated Cloud Q&A
Hi, Cory.  Have you performed a metadata retrieval operation?  Setting up the subscription just establishes the "working set" of metadata for the project/module that's used when deploying and retrieving, but it doesn't automatically perform any metadata operations.  You can initiate a retrieve in several ways:
  1. Menu bar - Build>Illuminated Cloud>Retrieve Metadata
  2. Context menu - Illuminated Cloud>Retrieve Metadata
  3. Keyboard - CTRL+ALT+SHIFT+Y on Windows/Linux or CMD+OPT+SHIFT+Y on Mac
In all cases, you then select which metadata you want and click OK.  You'll be presented with a directory comparison showing the downloaded metadata on the left and your local source root on the right.  Copy/merge whatever you want from left to right and close that window.

Please let me know if this doesn't help get you going.

Regards,
Scott Wells

cory....@zpaper.com

unread,
May 20, 2016, 2:59:32 PM5/20/16
to Illuminated Cloud Q&A
Thanks so much for the reply, Scott.

I've tried multiple times to retrieve the Metadata. I've performed the CTRL+ALT+SHIFT+Y and I just now tried the Build>Illuminated Cloud>Retrieve Metadata method. Neither seems to do anything. I see no activity down in the little footer bar (where long-running processes - like indexing - usually give feedback on their progress) and I never see the code in my src directory. Is there something that might interfere with the retrieval of the metadata?

Thanks again.
--Cory

Scott

unread,
May 20, 2016, 3:01:17 PM5/20/16
to Illuminated Cloud Q&A
Cory, can you look in idea.log (Help>Show Log in Explorer/Finder) and send me anything that looks like it might be contributing to the issue.  If there's nothing there, I can help you add some debug logging around this that will tell us exactly what's going on.

Regards,
Scott

cory....@zpaper.com

unread,
May 20, 2016, 3:15:07 PM5/20/16
to Illuminated Cloud Q&A
There are some entries pertaining to illuminated cloud. However, they don't appear to coincide with the times when I was trying to retrieve the metadata. For example, I just tried again to retrieve the metadata and I see nothing added to the log.

Here are some entries that I'm seeing:

2016-05-20 07:52:22,765 [419627225]   WARN - dktype.IlluminatedCloudSdkType - Failed to set the SDK for project '58Demo' and connection '58Demo'
2016-05-20 07:52:39,520 [419643980]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index CaseInsensitiveFilenameIndex
java.lang.Throwable: java.lang.Throwable: Rebuilding CaseInsensitiveFilenameIndex
    at com.intellij.util.indexing.FileBasedIndexImpl.scheduleRebuild(FileBasedIndexImpl.java:1313)
    at com.illuminatedcloud.intellij.index.IlluminatedCloudIndexUtil.rebuildIndices(SourceFile:406)
    at com.illuminatedcloud.intellij.index.IlluminatedCloudIndexUtil.rebuildIndices(SourceFile:317)
    at com.illuminatedcloud.intellij.settings.project.OfflineSymbolTableGenerator.generateOfflineSymbolTable(SourceFile:251)
    at com.illuminatedcloud.intellij.moduletype.IlluminatedCloudModuleValidator.resolve(SourceFile:502)
    at com.illuminatedcloud.intellij.moduletype.IlluminatedCloudInvalidModuleNotification$IlluminatedCloudInvalidModuleNotificationListener$1.run(SourceFile:93)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:345)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:329)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at com.intellij.ide.IdeEventQueue.h(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:658)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.Throwable: Rebuilding CaseInsensitiveFilenameIndex
    ... 24 more
2016-05-20 08:48:46,504 [423010964]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index CaseInsensitiveFilenameIndex
java.lang.Throwable: java.lang.Throwable: Rebuilding CaseInsensitiveFilenameIndex
    at com.intellij.util.indexing.FileBasedIndexImpl.scheduleRebuild(FileBasedIndexImpl.java:1313)
    at com.illuminatedcloud.intellij.index.IlluminatedCloudIndexUtil.rebuildIndices(SourceFile:406)
    at com.illuminatedcloud.intellij.index.IlluminatedCloudIndexUtil.rebuildIndices(SourceFile:317)
    at com.illuminatedcloud.intellij.settings.project.OfflineSymbolTableGenerator.generateOfflineSymbolTable(SourceFile:251)
    at com.illuminatedcloud.intellij.settings.project.OfflineSymbolTableGenerator.generateOfflineSymbolTable(SourceFile:94)
    at com.illuminatedcloud.intellij.settings.project.IlluminatedCloudProjectConfigurable.generateOfflineSymbolTable(SourceFile:1292)
    at com.illuminatedcloud.intellij.settings.project.IlluminatedCloudProjectConfigurable.access$1800(SourceFile:107)
    at com.illuminatedcloud.intellij.settings.project.IlluminatedCloudProjectConfigurable$22.actionPerformed(SourceFile:428)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.Component.processMouseEvent(Component.java:6535)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6300)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4891)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.h(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
    at java.awt.Dialog.show(Dialog.java:1084)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
    at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1661)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1610)
    at com.intellij.openapi.options.newEditor.SettingsDialog.access$001(SettingsDialog.java:41)
    at com.intellij.openapi.options.newEditor.SettingsDialog$1.run(SettingsDialog.java:80)
    at com.intellij.openapi.project.DumbPermissionServiceImpl.allowStartingDumbModeInside(DumbPermissionServiceImpl.java:37)
    at com.intellij.openapi.project.DumbService.allowStartingDumbModeInside(DumbService.java:283)
    at com.intellij.openapi.options.newEditor.SettingsDialog.show(SettingsDialog.java:77)
    at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:94)
    at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:65)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:191)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:162)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:126)
    at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:300)
    at java.awt.Component.processEvent(Component.java:6300)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4891)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.h(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.Throwable: Rebuilding CaseInsensitiveFilenameIndex
    ... 97 more


Scott

unread,
May 20, 2016, 3:30:19 PM5/20/16
to Illuminated Cloud Q&A
Okay, those are benign.  The IntelliJ IDEA plugin SDK logs that when you request a reindex.  Let's go ahead and get detailed info about the retrieval.  Go into Help>Debug Log Settings and add the following two entries:

#com.illuminatedcloud.intellij.builder.ForceComBuilder
#com.illuminatedcloud.intellij.builder.ForceComMetadataRetriever

Then run a retrieval again and it'll show me exactly what's going on.  If there's sensitive information in the log, feel free to email it to me at "support at illuminatedcloud dot com".  I'll let you know what I find.

Regards,
Scott

cory....@zpaper.com

unread,
May 20, 2016, 3:39:30 PM5/20/16
to Illuminated Cloud Q&A
No Joy. I entered the two entries you suggested, but nothing new is in the log. Here is what I see in the log:

2016-05-20 13:33:17,692 [440082152]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #com.illuminatedcloud.intellij.builder.ForceComBuilder, #com.illuminatedcloud.intellij.builder.ForceComMetadataRetriever

Since I thought that maybe the leading hash tags might be a typo (I'm used to seeing them as comment delimiters), when I didn't see anything in the log after trying to retrieve the metadata, I got rid of the hashtags and tried again. It didn't help. Here is all that shows up in the log:

2016-05-20 13:34:37,979 [440162439]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: com.illuminatedcloud.intellij.builder.ForceComBuilder, com.illuminatedcloud.intellij.builder.ForceComMetadataRetriever

Scott

unread,
May 20, 2016, 3:43:53 PM5/20/16
to Illuminated Cloud Q&A
No, the leading hash tags are actually required.  It doesn't look like the operation is even starting.  I'll email you directly for some additional discussion.

benedikt...@gmail.com

unread,
Sep 11, 2016, 11:12:41 AM9/11/16
to Illuminated Cloud Q&A
Scott,

I cant see lightning components (aura bundles) either, I re-download them via the functionality you describe above it all looks fine but I cant see them then.

Purchased to work better with lightning components ... your tip here and pointers to lightning docs for illuminated cloud would be very appreciated.

thx

benedikt

Scott

unread,
Sep 11, 2016, 1:22:31 PM9/11/16
to Illuminated Cloud Q&A
Benedikt, can you explain to me what's happening when you try to retrieve metadata?  Is the directory comparison window displayed so that you can copy them into your local source directory?  If not, would you mind minimizing the main IDE window to see if the directory comparison window is behind it?  That's a known bug with JetBrains' bundled OpenJDK JRE (one of several) that can be resolved by switching to an Oracle JRE.

Let me know what you're seeing and I'll definitely help you get it working.

Best regards,
Scott Wells
Reply all
Reply to author
Forward
0 new messages