IntelliJ IDEA Authoring Assistance

263 views
Skip to first unread message

D'Angelo Guiton

unread,
Jan 31, 2022, 5:32:25 PM1/31/22
to Geb User Mailing List
Hey everyone, myself and my team are currently struggling with an issue with IntelliJ regarding the implementation of Authoring Assistance as described here: https://gebish.org/manual/current/#intellij-support

Currently we are unable to utilize autocomplete for Navigators defined within our Page and Module classes when referencing them in our scripts.

So in the following example:
    and: "I click on Some Button on Some Page"
    def somePage = to SomePage
    somePage.someButton.click()


In the instance that "SomePage" is defined as such:
    class SomePage extends Page {
        static at title.contains("SomePage") }
        static content {
        someButton(wait:true) {$(#"someButton")}
        }
    }


We are unable to utilize autocomplete when referencing "someButton" when making the call:
    editCallPage.someButton.click()

At this point we're starting to believe that strong typing is the best method (as it enables autocomplete) to allow for this functionality, but the Book of Geb lists IntelliJ IDEA's support as a viable alternative so I just don't understand what our team is doing wrong here.

We are currently utilizing IntelliJ IDEA 2021.2.3 (Ultimate Edition)
Any assistance would be greatly appreciated! Thanks!

Marcin Erdmann

unread,
Feb 1, 2022, 3:50:18 AM2/1/22
to geb-...@googlegroups.com
Can you please clarify what you mean by "utilize autocomplete"? Do you not see someButton in the autocomplete dropdown or is someButton completely unrecognised by IntelliJ and is not navigable to even if you manually type it out? If it's the former then note that IntelliJ treats content definitions as "secondary" candidates for autocompletion and you need to press the autocomplete prompt (ctrl + space in my setup) twice to see them... You can see the autocomplete results after pressing the prompt once and twice in the screenshots I'm attaching.

I'm using the authoring support in IntelliJ as described in the Book of Geb on a daily basis so I'm 100% certain it works.

Marcin

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/6becb06c-eb5b-4e25-bfe2-ca4e32c4d542n%40googlegroups.com.
Screenshot 2022-02-01 at 08.47.25.png
Screenshot 2022-02-01 at 08.47.07.png

D'Angelo Guiton

unread,
Feb 1, 2022, 1:49:22 PM2/1/22
to Geb User Mailing List
As you surmised, I was indeed having difficulty with the former. That is, I did not see "someButton" in the autocomplete dropdown but it was recognized by IntelliJ and navigable when manually typed out.

After reading your solution, I am seeing "someButton" in the autocomplete dropdown when pressing the autocomplete prompt (ctrl + space in my setup as well) a second time.
So I would consider this issue resolved! 
I am curious however, if it's possible to see secondary candidates w/o the need to press the autocomplete prompt twice and if you might know how that could be done.

Thank you for your assistance! It is very much appreciated.

Reply all
Reply to author
Forward
0 new messages