Hello,

I spent some more time trying to see if I could get IntelliJ to handle
groovyScript files without making changes to build.gradle, but cannot find
any other workarounds.

Although we don't generally want to put lots of IDE specific code into our
sources, we do seem to do this occasionally since we include
OfbizDslDescriptorForIntelliJ.gdsl and OfbizDslDescriptorForEclipse.dsld to
improve the developer experience.

Further, the change I'm proposing isn't really IntelliJ specific, it is
just the only way I can get IntelliJ to recognise groovyScript files.

Therefore if there are no objections to this change, and if no issues are
reported by other IDE users, I'll merge it in a few days.

Thanks,

Dan.

On Wed, 20 Jan 2021 at 10:31, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> Hi Daniel, All,
>
> I use only Eclipse (for 15+ years and 2020-12 currently) with[1]+[2] and I
> have no problems with classpath nor navigation to Java classes from Groovy
> scripts
>
> [1] Buildship: Eclipse Plug-ins for Gradle, provided as part of the Gradle
> Platform.
> [2] Eclipse Groovy Development Tools. Provides the main plug-ins to create
> and work with Groovy artifacts. It provides a powerful editor, code
> completion, syntax-highlighting, JUnit support, wizards and a seamless
> integration into the Java development functionality.
>
> FWIW, HTH
>
> Jacques
>
> Le 18/01/2021 à 09:54, Girish Vasmatkar a écrit :
> > Hi Daniel
> >
> > I am on Eclipse most of the time and use the gradle eclipse plug-in to
> just
> > build the classpath. I have not faced this issue on Eclipse so can't
> speak
> > to that.
> >
> > That said, I see no issues with selecting SDK or compiler for the Groovy
> > files. I do it on eclipse and it works without generating dupes. I launch
> > OFBiz from within IDE and can navigate to other OFBiz classes as well.
> >
> > I'll also give it a try on IntelliJ and let you know how it goes.
> >
> > Best,
> > Girish
> >
> >
> >
> >
> > On Mon, Jan 18, 2021 at 1:32 PM Pritam Kute <
> pritam.k...@hotwaxsystems.com>
> > wrote:
> >
> >> Hello Emad,
> >>
> >> I have tried those changes and can confirm that those are working as
> >> expected. Thanks!
> >>
> >> Kind Regards,
> >> --
> >> Pritam Kute
> >>
> >>
> >> On Sun, Jan 17, 2021 at 9:01 PM Daniel Watford <d...@foomoo.co.uk>
> wrote:
> >>
> >>> Hello,
> >>>
> >>> I use IntelliJ for ofbiz development, but have found it awkward to work
> >>> with groovyScript files.
> >>>
> >>> Each time I would view a groovyScript file IntelliJ would display a
> >> warning
> >>> that the file was not associated with a Groovy SDK and prompt me to
> >> select
> >>> one. Further, I couldn't navigate from a groovyScript file to other
> ofbiz
> >>> classes.
> >>>
> >>> IntelliJ imports the project script from the build.gradle file, so any
> >>> changes I might have manually made to ease IDE development of
> >> groovyScript
> >>> files were lost as soon as I reimported build.gradle.
> >>>
> >>> To address this I needed to add the groovyScript files to the gradle
> >> build
> >>> in some way, while at the same time preventing the files from being
> built
> >>> and turned into classes.
> >>>
> >>> Some minor changes to the build.gradle file have been added to a branch
> >>> here -
> >>> https://github.com/danwatford/ofbiz-framework/tree/groovyScript-gradle
> >>>
> >>> I have tested these build.gradle changes in IntelliJ and can now
> navigate
> >>> from groovyScript to ofbiz classes.
> >>>
> >>> Please could other IDE users (eclipse, netbeans, etc0 try out the
> changes
> >>> in the branch to see if the developer experience is improved when
> >> importing
> >>> the ofbiz project structure from the gradle build file.
> >>>
> >>> Thanks,
> >>>
> >>> Dan.
> >>>
> >>> --
> >>> Daniel Watford
> >>>
>


-- 
Daniel Watford

Reply via email to