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.
"Profile Project" item in Web Project context menu don't correspond with UI specification. See http://wiki.netbeans.org/wiki/view/ProjectContextualMenus .
This is the same also for EAR.
It seems that Profile item doesn't correspond with UI specification for all Web and J2EE projects (web,web freeform,ejb,ear...).
Profile Project is placed incorrectly in project popup menu for each project type. I'm not aware of any API which would make it possible to follow the UI spec and place Profile Project right below Test. Reassigning to projects for evaluation what can be done.
I assume you currently register your action under Projects/Actions in layers, right? I basically see 2 solutions, however both require changes done in all the project type code (thus each project type maintainer will have to fix it on his own) 1. Create a different placeholder in layers (Projects/Profiler-Actions) and put the loading of the folder in the right place. 2. Have the profile action added to CommonActions class and allow the profiler guys to plug into that somehow. the project type code would that have to add something like: actions.add(CommonProjectActions.profileProjectAction()); Any of the solutions preferred? 1. probably easier to code but means more copy&paste code in each project type codebase.
Really we ought to have something like editor/mimelookup/api for merging generic and specific action lists to form project context menus. I have never been happy with the Projects/Actions folder because it does not include the actions that the project itself provides. This issue requires API changes. I recommend it be waived for 6.0 and we can fix it properly in the next release.
I'm not sure it's acceptable to waive, especially given that a temporary solution is reasonably simple. I agree that a long term solution is something along the lines of mime lookup (or is it looks? ;) However can mime lookup also mask/remove generic action from a specific project type? For example the maven projects don't have "Profile"-ing implemented, so it doesn't really make sense to show that in popup. (that's a bug, but I'm sure there's also some non-bug usecases.) So what about a "Projects/Profiler_actions_temporary" layer location with "Profile" action there. for 6.0.
The MIME Lookup API does indeed support hiding files from base folders. In this case I don't think it would be needed anyway, since the Profile Project action (or whatever) should simply disable (and hide) itself when included in the context menu of projects to which it cannot be applied. A temporary friend API for 6.0 such as you suggest might be OK, so long as there is a P2 DEFECT filed for post-6.0 to remove or replace it. Should go to apireviews.
BTW an alternate hack for 6.0, with lower risk of producing compatibility problems, would be for project types to just look for actions in Projects/Actions/ with 'profiler' somehow in their name (details TBD) and move them up.
*** Issue 107798 has been marked as a duplicate of this issue. ***
*** Issue 98516 has been marked as a duplicate of this issue. ***
*** Issue 104365 has been marked as a duplicate of this issue. ***
Created attachment 44503 [details] suggested patch
please review this change. While it's not intended to be an official contract, it probably deserves a review. We need to move the "Profile" action to a different location. The current api for profiler and other modules to put items into the project's popup menu is to register your action in layers under "Projects/Actions". In order to place the profile action elsewhere (according to spec) I introduced another location in the layers which is intended for the profiler to use only.
thanks for the review
done. profiler guys, please move your profiler action to Projects/Profiler_Actions_temporary folder in layers. Checking in web/project/src/org/netbeans/modules/web/project/ui/WebLogicalViewProvider.java; /cvs/web/project/src/org/netbeans/modules/web/project/ui/WebLogicalViewProvider.java,v <-- WebLogicalViewProvider.java new revision: 1.13; previous revision: 1.12 done Checking in java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/J2SELogicalViewProvider.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/J2SELogicalViewProvider.java,v <-- J2SELogicalViewProvider.java new revision: 1.28; previous revision: 1.27 done Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/EjbJarLogicalViewProvider.java; /cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/EjbJarLogicalViewProvider.java,v <-- EjbJarLogicalViewProvider.java new revision: 1.28; previous revision: 1.27 done Checking in j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/J2eeArchiveLogicalViewProvider.java; /cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/J2eeArchiveLogicalViewProvider.java,v <-- J2eeArchiveLogicalViewProvider.java new revision: 1.23; previous revision: 1.22 done
Thanks for fixing at projects side, reopening (original issue not yet fixed) and assigning back to profiler.
Could you please update also popup menus of other project types according to the spec? I cannot commit the profiler- side fix, it would cause a regression for these project types: Freeform Java Project Web Freeform Project Plugin Modules - Module - Module Suite - Library Wrapper Module
OK, will try to fix myself...
Fixed for Freeform project and Plugin Modules Checking in ant/freeform/src/org/netbeans/modules/ant/freeform/Actions.java; /cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/Actions.java,v <-- Actions.java new revision: 1.25; previous revision: 1.24 done Checking in apisupport/project/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java; /cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java,v <-- ModuleActions.java new revision: 1.31; previous revision: 1.30 done Checking in apisupport/project/src/org/netbeans/modules/apisupport/project/ui/SuiteActions.java; /cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/SuiteActions.java,v <-- SuiteActions.java new revision: 1.26; previous revision: 1.25 done
Profile Project action moved to Projects/Profiler_Actions_temporary folder in profiler trunk. Fixed for Beta1.
VERIFIED
ok