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.
|Summary:||Introduce save actions|
|Component:||Actions/Menu/Toolbar||Assignee:||Miloslav Metelka <mmetelka>|
|Severity:||blocker||CC:||gualtiero65, javydreamercsw, jiri_pejchal, lhasik, markiewb, nicolo, pderaaij, SkorpEN, support|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
|Bug Depends on:|
Description hjuskewycz 2008-07-18 12:19:23 UTC
Eclipse has this neat feature 'save action'. Every time a file is save, specified actions are performed. This would be great for Netbeans, especially if you consider also using Macros. Let's have the following scenario: there are some standard macros, like do formatting, correct intentions, and so forth; and the user has the ability to add own macros to this. I also would go one step further and would create an API for third party extensions. E.g. modules for doing code analysis, check for guidelines, ... could be included then as well. I really hope you like my idea :) because it would help a lot.
Comment 1 Vitezslav Stejskal 2008-07-22 13:36:10 UTC
Should probably be solved for all files in some generic way.
Comment 2 nicolo 2010-03-16 13:58:33 UTC
I agree with you!!! Save actions would be very useful
Comment 3 David Strupl 2011-04-21 13:29:27 UTC
*** Bug 182112 has been marked as a duplicate of this bug. ***
Comment 4 David Strupl 2011-04-21 13:29:50 UTC
*** Bug 156460 has been marked as a duplicate of this bug. ***
Comment 5 David Strupl 2011-04-21 13:29:58 UTC
*** Bug 189234 has been marked as a duplicate of this bug. ***
Comment 6 andird 2011-08-14 14:24:21 UTC
This should be one of the most important feature. I'm new to netbeans, so I'm bit confused not many people vote for this. We should learn from eclipse on this one.
Comment 7 nicolo 2011-08-22 07:11:20 UTC
(In reply to comment #6) > This should be one of the most important feature. > I'm new to netbeans, so I'm bit confused not many people vote for this. > We should learn from eclipse on this one. I agree with you :)
Comment 8 suvi 2011-08-22 08:50:24 UTC
One of the use cases is Auto Formating. Everytime a file is saved the auto formating is getting applied. Probably not everybody would like to have it, as for me, I would love to have this. You have my vote.
Comment 9 suvi 2011-08-22 14:51:12 UTC
Cleanup Imports would be another great usage of the "save actions".
Comment 10 nbsocko 2011-12-02 14:15:28 UTC
+1 for this feature
Comment 11 markiewb 2012-03-11 16:50:38 UTC
I think this is a duplicate of http://netbeans.org/bugzilla/show_bug.cgi?id=14202. The other bug is still older than this one.
Comment 12 err 2012-05-17 21:47:23 UTC
(In reply to comment #11) > I think this is a duplicate of > http://netbeans.org/bugzilla/show_bug.cgi?id=14202. > > The other bug is still older than this one. Actually this is a more generic feature than Bug 14202. Perhaps that bug should depend on this one.
Comment 13 markiewb 2012-05-18 18:10:26 UTC
(In reply to comment #12) > (In reply to comment #11) > > I think this is a duplicate of > > http://netbeans.org/bugzilla/show_bug.cgi?id=14202. > > > > The other bug is still older than this one. > > Actually this is a more generic feature than Bug 14202. Perhaps that bug should > depend on this one. I agree. FYI i also commented the other issue @ http://netbeans.org/bugzilla/show_bug.cgi?id=14202#c27
Comment 14 Miloslav Metelka 2012-09-02 22:56:54 UTC
http://hg.netbeans.org/jet-main/rev/4d46d72092d6 In addition I will add an SPI for custom before-save tasks registrations.
Comment 15 Quality Engineering 2012-09-04 01:09:32 UTC
Integrated into 'main-golden', will be available in build *201209040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/4d46d72092d6 User: Miloslav Metelka <email@example.com> Log: #140719 - Introduce save actions.
Comment 16 andrewv 2012-09-04 15:10:25 UTC
I just found this feature request when looking for some sort of "-pre-autodeploy" task in build.xml. Would the fix allow me to specify pre- or post-save actions on a project-by-project basis (via build.xml), or is it exclusively a UI option applied to all projects? I'm looking call an Ant "buildnumber" task every time any file in my web project changes. This would allow me to tweak the HTML5 cache manifest anytime I change something so I'm always seeing the latest version of my site during development. Or does similar functionality already exist?
Comment 17 Miloslav Metelka 2012-09-05 15:51:32 UTC
An upcoming fix of issue #217904 will allow modules to register custom OnSaveTask implementations into a MimeLookup for a particular mime-type. The tasks will be executed right before a save operation is done for a particular document. Generally the task should not perform any slow actions synchronously (or wait for locks that can be busy for long time).
Comment 18 Miloslav Metelka 2012-10-11 12:03:15 UTC
Implemented in NB 7.3 as Tools->Options->Editor->On Save panel.
Comment 19 markiewb 2012-11-28 22:43:13 UTC
*** Bug 14202 has been marked as a duplicate of this bug. ***
Comment 20 markiewb 2013-08-10 14:48:40 UTC
*** Bug 213161 has been marked as a duplicate of this bug. ***
Comment 21 Jackie_Rosen 2014-02-16 11:24:49 UTC
SPAM - Removed by Administrator