Can't create Apex triggers from Project view

Issue #104 resolved
Eli Kloswick created an issue

In all of my projects, if I right click on the triggers folder and select "New > Apex Trigger", a popup comes up with the appropriate options for creating an Apex trigger. However, the "SObject type" dropdown list is always empty, and (I'm assuming) this prevents any triggers from actually being created from this menu. Even if I fill out the Name field and check the boxes on when the trigger should fire, it doesn't create after pressing "OK".

I've checked my connections to the orgs, ensured all plugins are active, and updated to the latest version of the plugin. I've also checked the error log, but I didn't see anything that might cause this (attached just in case).

Comments (6)

  1. Scott Wells repo owner

    Hi, Eli. Sorry that you're having this issue. Let's go through a couple of possible causes and see if we can get you past it.

    I'm enumerating the list of SObject types from the local project plus the Offline Symbol Table (OST) for that drop-down. Can you verify that you've generated the OST for this connection? If not, please do so. If so, can you verify that you can navigate to SObject using CTRL+N > SObject and see that it has subclasses (click the down arrow in the left-hand gutter or use CTRL+ALT+B when the caret is on SObject in the class declaration):

    Issue104.png

    That will let me know whether you have SObjects in your OST or not.

    If you've previously generated your OST and don't have SObjects, try regenerating your OST. I can't imagine why it would complete OST generation successfully but not have SObjects, but let's rule that out.

    If you do have SObjects in your OST (particularly the SObject base class), the next step will be to force rebuild caches and indices. You can do that from Settings(>Languages & Frameworks)>Illuminated Cloud (connectionName) by clicking the Rebuild button. Then let it restart IDEA and build indices.

    Try those and let me know the results. Thanks much and sorry again for the issue!

  2. Eli Kloswick reporter

    It showed that i had an OST generated, but no SObject class was there. I attempted to generate a new one, but it didn't finish, instead giving me a "Java heap space" error. I bumped up the compiler build process heap size to 2000 MB, but that didn't work either. Is that the right setting to increase, or is it somewhere else?

  3. Scott Wells repo owner

    Aha! No, you'll need to bump up the max heap size for IntelliJ IDEA itself. Consult this documentation on how to do so:

    https://intellij-support.jetbrains.com/hc/en-us/articles/206827537-Configuring-JVM-options-and-platform-properties

    I've had a few other users hit this same type of problem. I have an open issue (#68 if you want to vote on it) to see if I can be a little more memory efficient during OST generation, but since there's an easy workaround via bumping the IDE's heap size (which I have to do for many of my Java projects as well), it's lower priority.

    Let me know if you have any issues making the change and/or generating the OST after doing so.

  4. Log in to comment