"Run Focused Test Method" and "Debug Focused Test Method" for NetBeans Groovy Support Now in main-golden and Nightly Builds

If you use NetBeans nightly builds you will now have this functionality. Try it out, and let me know if you experience any issues.


"Run Focused Test Method" and "Debug Focused Test Method" for NetBeans Groovy Support in main and main-silver Hg Repositories

The ability to run or debug a single Groovy test from the IDE has now been merged into the main and main-silver Hg repositories for the NetBeans IDE. I assume this will work into main-golden and thus the nightly dev builds soon. I will post another update once that happens.


Adding "Run Focused Test Method" and "Debug Focused Test Method" to NetBeans Groovy Support

If you are a NetBeans and Groovy fan, then you have probably noticed over the years you can not execute nor debug an individual test method if using Groovy for testing. I have contributed to other parts of the IDE at various times, but hadn't looked into the Groovy support until recently. I finally had enough executing all tests in a file.

The code isn't necessarily difficult. For what I am adding it is slightly complicated due to NetBeans Groovy support module dependencies, and some things needing to be broken out a little differently. For now I am using reflection to access what I need, and that will work fine enough in the near term. Long term I plan to work with other community contributors to clean things up.

Another thing which makes coding this interesting is a mismatch between NetBeans notion of an offset into a source file and the Groovy ASTs notion of it. NetBeans uses a cursor or single integer value offset, and Groovy uses the notion of a line and column. So, some translation and AST traversal is needed to pinpoint the selected method. Standard editor things, but of note for this fix.

Too, the previous code halfway attempted to do this, but it seems some copy and paste happened between the Java and Groovy support as that code was using Java specific features which will not exactly work as Java is a subset of Groovy. The Groovy AST classes along with a little translation fixed it right up.

The changes should make their way into the code base soon. I have things working locally. I am now cleaning things up. I figure I will tackle other items which bother me about NetBeans Groovy support now that I am getting into it.

I will update once merged in, so check back.


Writing Again

It has certainly been a while since I have written. It will be an experience to start up again. The formula I have used in the past is to write about things I'm working on or feeling passionate about, and to lay out some element of that to share, either in pure informational or tutorial form, while occasionally whining or barking about something which perhaps I should or should not excerpt such effort.

In my new attempts, I will strive to further limit non-software development topics for this blog. I am thinking of a couple others specifically for electronic and energy experiments as I do like to tinker, and no other topics beyond those at the moment, even if politics does tend to affect my sensibilities.

I have nothing against other topics outright, but they seem more suited to other compartmentalized blogs or resources, and too, planning and writing, even about topics which I'm knowledgeable, takes time regardless of its enjoyment, and I would like this round to be more lasting, and hopefully reaching into my elder years; which would be a good run, and perhaps wishful dreaming :-)

My hope is this post will be a public, self inspiring or fulfilling way to kick start the process of writing again (and a reminder). Who knows, maybe it will lead to a YouTube channel as well, but I love the written format.

With more responsibility, maturity, and a family, I hope can keep at it, and it becomes something I can share with my children and family, and though they may or may not write about software, electronics, or energy, perhaps they will be inspired to produce content of their own, and discover the act of creation is just as much about learning and enjoyment as anything.

A sample of topics I am pondering for the software blog include

  • Programming Languages; including Java, Groovy, JavaScript, Python, C, C++, C#, Ceylon, Kotlin, Ruby, PHP, Go, and Web Assembly
  • the Amazon Cloud
  • Containers
  • Microservices; including Sprint Boot and Dropwizard
  • Data Stores
  • HTML5 Games and Phaser.io
  • Drone and Quadcopter Software
  • NetBeans and the NetBeans Platform
We will see.

For some relevant background, I am a husband, father, amateur experimenter, and software engineer with over 18 years experience architecting and implementing solutions for multiple computing profiles using various technologies and operating systems.

Currently, in my professional time, I work daily with the AWS Cloud, Groovy,  Java,  JavaScript, AngularJS, and Node.js plus other Web backend and front end technologies, and am a senior lead software engineer for a media company where internally we are focusing on distributed services, single page applications, and evolvable systems to support our business users and media partners as best as possible. It is a wonderful experience and set of teams.

With my current personal time, I am attempting game design and development as well as learning Drone technology. I also dabble in simple energy experiments such as salt water batteries and biodiesel, try to learn as much about physics and mathematics as I can find time, and have a few other interests.

Life is way too short, and goes by way too fast. See you next time.