ApexDoc block no longer prototyping method doc blocks

Issue #2487 resolved
Kevin Poorman created an issue

I have enabled ApexDoc and the /** shortcut.

However, when I type /** followed by <enter> on the line above a method, it generates an empty comment, with no @decription, @param or @return tags. I could have sworn this was working before the latest IDE update. Here’s a screen shot of what it now generates.

Comments (12)

  1. Scott Wells repo owner
    • changed status to open

    Kevin, the options you have enabled are the ones required for that feature to work. I just verified locally that it's still working for me, and none of the recent builds have included any changes in that area; they've all been around adding Flow preview for the most part.

    Can you please attach your idea.log for review after reproducing this behavior?

  2. Kevin Poorman reporter
      <div class="preview-container wiki-content"><!-- loaded via ajax --></div>
      <div class="mask"></div>
    </div>
    

    </div> </form>

  3. Scott Wells repo owner

    Hmmmm….nothing odd in that log. Some noise from a few things where IC2 still supports older IDE versions and therefore plugin SDK versions, but nothing relating to the issue you’re seeing. Does this happen when typing /**<enter> before any type/body declaration or only specific ones? How about other projects? Trying to determine if it’s a pervasive issue or limited to specific declarations? If specific declarations, can you provide a concrete example so I can try to reproduce it locally?

  4. Kevin Poorman reporter

    @Scott Wells -

    Background. I have two active projects. ApexKit - open source. And a private project.

    I discovered this issue while working on the ApexKit project. I cloned the repo from github directly within intelli-j.

    answers to your specific questions.

    1. The /**<enter> results in an blank block comment that is … oddly formatted. (see screen shot above) when I type on the line directly above a method, property or class definition.
    2. This works as-expected in my work project. Just not in the ApexKit project. Not sure what could be futzing with it?
    3. I don’t believe it’s limited to specific declarations, but it does appear to be limited to one specific project. is there something that could override IC’s comment generation bits specific to a project?

  5. Scott Wells repo owner

    Hmmmm…I have ApexKit cloned locally as one of my open source test projects. I just opened it and tried to reproduce the issue on a few methods in that project but was unable to do so. Could you perhaps archive your project’s .idea directory and .iml file (if not under the .idea directory already) and share them so I can see if there’s something in the project config contributing to this?

  6. Scott Wells repo owner

    Thanks. I just updated my ApexKit project to use your .idea directory with the only real adjustments being around the connection name (ApexKit2 => ApexKit). I opened the project and tried to add an ApexDoc header to one of the existing methods (after deleting the existing one), and it worked just fine:

        /**
         * @param inputs 
         *
         * @return
         */
        @InvocableMethod(
            Label='Universal Invocable'
            Description='Universal Invocable'
        )
        public static List<UniversalFlowInputOutput> invoke(
            List<UniversalFlowInputOutput> inputs
        ) {
            return new UFInvocable.Processor(inputs).execute();
        }
    

    I think the next step is for you to close this project, delete the .idea directory, reopen the project, and accept IC2’s prompts to reconfigure it. My guess is that won’t help in which case I’ll likely need to provide you a build with some additional instrumented debug logging to determine why the logic to reformat the created ApexDoc comment isn’t kicking in.

  7. Kevin Poorman reporter

    @Scott wells - I cannot explain why this was happening. After taking the following (drastic?) steps I have regained the comment prototyping functionality.

    1. Uninstall Intellij Idea
    2. rm -rf USERNAME/Library/Application Support/JetBrains
    3. rm -rf USERNAME/Library/caches/JetBrains
    4. download and install latest Intellij
    5. reinstall plugins (including IC)
    6. delete my checkout’s .idea and IlluminatedCloud directories.
    7. Open intellij, the project folder and letting IC resolve the configuration issue.

    I’d tried most of these steps individually before, but it was only after doing all of those things that it started to work again.

  8. Scott Wells repo owner

    Ugh...one of my absolute least favorite types of bug, those that go away after an uninstall/reinstall ("have you tried turning it off and on again?") with no other evidence of why they're happening. I think I'll look at the bright side on this one and just take the W that it's working for you now, but a resolution like this definitely doesn't sit well with me. Needless to say, please let me know if you see this behavior again in the future.

  9. Scott Wells repo owner

    I suppose it’s possible. I don’t have the GH Copilot plugin enabled, but it should be pretty simple to test with that plugin enabled and disabled to see if it’s contributing at all.

  10. Log in to comment