This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 212829 - Run/Debug focused method
Summary: Run/Debug focused method
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: _ wadechandler
URL:
Keywords:
: 173523 228735 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-22 11:38 UTC by Martin Janicek
Modified: 2016-09-12 02:00 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patch adding run/debug current method for Groovy tests (50.58 KB, patch)
2016-09-08 00:28 UTC, _ wadechandler
Details | Diff
Update to the patch; noticed some oddities between the CLI and the IDE (56.78 KB, patch)
2016-09-09 05:16 UTC, _ wadechandler
Details | Diff
TestCase project (6.76 KB, patch)
2016-09-10 10:37 UTC, bruno.flavio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Janicek 2012-05-22 11:38:09 UTC
Would be nice to implement Run Focused Test Method/Debug Focused Test Method in the same way as it is for Java files.
Comment 1 Martin Janicek 2012-08-27 13:20:10 UTC
Some parts implemented in: http://hg.netbeans.org/web-main/rev/fba6a768ce89
..but it's not activated yet and still needs some improvements. Focusing to the TM = Next
Comment 2 Martin Janicek 2013-04-19 09:35:49 UTC
*** Bug 173523 has been marked as a duplicate of this bug. ***
Comment 3 Martin Janicek 2013-04-19 09:35:54 UTC
*** Bug 228735 has been marked as a duplicate of this bug. ***
Comment 4 _ wadechandler 2016-09-08 00:12:56 UTC
I'm working on this ATM. I have things working nicely locally, and am building my patch out. I will have it attached directly.
Comment 5 _ wadechandler 2016-09-08 00:28:01 UTC
Created attachment 161956 [details]
Patch adding run/debug current method for Groovy tests
Comment 6 _ wadechandler 2016-09-08 00:31:48 UTC
Currently I'm not making any special checks to see if the file is actually a test file. The popup menu options will work if any method is selected, and then the users build system will tell them no tests were run or there was an error related to what they have done. I think it is pretty obvious. Determining if it is actually a test considering the different types of tests which can be done with Groovy DSL seems quite difficult, so by not making assumptions, and allowing the method name to be derived by the Groovy parser seems the best approach, and usage will be in the users hands. This is WAY better than not having this option at all as I can tell you I will save MUCH time with this feature.
Comment 7 _ wadechandler 2016-09-08 00:39:35 UTC
Bruno, I added you to the CC so we could communicate through the issue. I have submitted the patch here. Thanks.
Comment 8 _ wadechandler 2016-09-09 05:16:44 UTC
Created attachment 161977 [details]
Update to the patch; noticed some oddities between the CLI and the IDE
Comment 9 bruno.flavio 2016-09-10 10:37:45 UTC
Created attachment 161990 [details]
TestCase project

Wade, thank you for contributing this patch.

I'm attaching to this issue the small testcase project I've used to test it's functionality.

Both the Run and Debug focused operations work fine with your patch.

-Bruno
Comment 10 bruno.flavio 2016-09-10 22:20:52 UTC
Thank you for the patch Wade, I've applied it on your behalf.

http://hg.netbeans.org/core-main/rev/1b3165039703
Comment 11 Quality Engineering 2016-09-12 02:00:52 UTC
Integrated into 'main-silver', will be available in build *201609120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1b3165039703
User: Bruno Fl