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 207227

Summary: Use declarative registration for apisupport.project actions
Product: apisupport Reporter: J Bachorik <yardus>
Component: ProjectAssignee: Jesse Glick <jglick>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P1    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Bug Depends on: 182488    
Bug Blocks: 203519    
Attachments: patch
patch (correct mime this time)

Description J Bachorik 2012-01-12 15:11:38 UTC
While working in #203519 I encountered a stopper in the apisupport.ant project in the form of hard-coded project actions. The profile action needs a custom performer and it makes it impractical to enumerate the action along the others in the ModuleActions.java file - doing that would require a specific profiler API and, anyway, , all the other project types declare the actions in layer.xml file instead of directly in the source.

This seems to be a good reason to switch to using layer.xml action declaration even for apisupport projects.
Comment 1 J Bachorik 2012-01-12 15:12:47 UTC
Created attachment 114834 [details]
patch
Comment 2 J Bachorik 2012-01-12 15:13:38 UTC
Jesse, feel free to reassign the task to me once you feel comfortable with the proposed change.
Comment 3 J Bachorik 2012-01-12 15:19:37 UTC
Created attachment 114835 [details]
patch (correct mime this time)
Comment 4 Jesse Glick 2012-01-12 16:45:36 UTC
Let me take a look.
Comment 5 Jesse Glick 2012-01-12 17:22:44 UTC
A number of things I want to change in this patch, actually.
Comment 6 J Bachorik 2012-01-12 20:10:09 UTC
(In reply to comment #5)
> A number of things I want to change in this patch, actually.
No problem. I just simply converted the programmatic registrations to their layer equivalents keeping the functionality exactly as it was.
Comment 7 Jesse Glick 2012-01-12 20:28:59 UTC
I am retaining Projects/Profiler_Actions_temporary/ in this commit because it is not currently empty (in the trunk anyway). I assume you plan to remove all entries from this folder at some point; when you do that, just remove all the shadows to it from project action folders too.

Among many other things, my version of the patch converts suite projects as well.

core-main #31d7da043210
Comment 8 J Bachorik 2012-01-12 20:32:29 UTC
Thanks
Comment 9 Quality Engineering 2012-01-13 21:52:45 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/31d7da043210
User: Jesse Glick <jglick@netbeans.org>
Log: #207227: declarative registration of apisupport.project actions.