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 249925 - Allow to define tasks for Run and Debug actions
Summary: Allow to define tasks for Run and Debug actions
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Tools (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on: 250573
Blocks:
  Show dependency tree
 
Reported: 2015-01-21 10:08 UTC by Tomas Mysik
Modified: 2015-02-20 10:20 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2015-01-21 10:08:33 UTC
We could (or perhaps should?) allow to define tasks in the Project Properties dialog for other actions as well (Run, Debug).

What do you think, Láďo? Does it makes sense? BTW it is already possible, one just need to edit project.properties file manually and add there relevant task definitions.

Thanks.
Comment 1 Vladimir Riha 2015-01-21 10:29:00 UTC
Yes, I've seen it one project where they have "build" on run action (ask MartinF). If I understand it correctly, it always triggers the defined task and then continue with the default IDE action? If so, it might be described as "before run" and "before debug" ?
Comment 2 Tomas Mysik 2015-01-21 10:30:30 UTC
Yes, exactly.
Comment 3 Martin Fousek 2015-01-21 12:04:57 UTC
+1 for that, otherwise nobody knows about that cool feature how to connect Grunt and NetBeans actions together.
Comment 4 Tomas Mysik 2015-01-21 12:06:57 UTC
Fine. Which actions to add?
- Run project
- Debug project
- Run file?
- Debug file?
- ?

Thanks.
Comment 5 Vladimir Riha 2015-01-21 12:10:16 UTC
Maybe Test would be useful as well
Comment 6 Martin Fousek 2015-01-21 12:12:41 UTC
(In reply to Tomas Mysik from comment #4)
> Fine. Which actions to add?
> - Run project
> - Debug project
> - Run file?
> - Debug file?
> - ?
> 
> Thanks.

For our use cases the most preferred action to wrap would be pre-run/pre-debug and maybe post-npm/post-bower install. But not sure whether it's even possible. For now we are using pre-run project action for everything. But especially 'post-bower install' could save some time for copying/pruning libraries.
Comment 7 Martin Fousek 2015-01-21 12:13:09 UTC
(In reply to Vladimir Riha from comment #5)
> Maybe Test would be useful as well

I agree.
Comment 8 Tomas Mysik 2015-01-21 12:16:58 UTC
(In reply to Martin Fousek from comment #6)
> and maybe post-npm/post-bower install.

Unfortunately not possible, these are not standard IDE actions. You could try using npm scripts [1].

Thanks.
[1] https://docs.npmjs.com/misc/scripts
Comment 9 Tomas Mysik 2015-02-12 09:45:43 UTC
Done, please verify. Thanks!

http://hg.netbeans.org/web-main/rev/cdaa924bf8c4
Comment 10 Quality Engineering 2015-02-13 04:13:43 UTC
Integrated into 'main-silver', will be available in build *201502130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/cdaa924bf8c4
User: Tomas Mysik <tmysik@netbeans.org>
Log: #249925 - Allow to define tasks for Run and Debug actions
Comment 11 Vladimir Riha 2015-02-20 10:18:49 UTC
Except of issue 250573, it works fine with Grunt/Gupl/Phing. In PHP projects, test files do not have Test file action, only Run so it works with task mapped to Run but the mapping option is probably not useful (tested with PHPUnit). Perhaps Test file mapping could be removed from Phing panel (if it is possible to remove it just from Phing)?


Product Version: NetBeans IDE Dev (Build 201502200001)
Java: 1.8.0_25; Java HotSpot(TM) Client VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b17
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 12 Tomas Mysik 2015-02-20 10:20:44 UTC
(In reply to Vladimir Riha from comment #11)
> Perhaps Test file mapping could be removed from Phing panel
> (if it is possible to remove it just from Phing)?

Currently not possible but please, submit an issue for it, I will do it.

Thanks.