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 182455 - No way to place an action between "Build" and "Clean"
Summary: No way to place an action between "Build" and "Clean"
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on: 182488
Blocks:
  Show dependency tree
 
Reported: 2010-03-21 21:17 UTC by Tim Lebedkov
Modified: 2010-05-06 21:50 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
web project patch (50.18 KB, text/plain)
2010-04-09 02:38 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lebedkov 2010-03-21 21:17:16 UTC
I try to place my own action between "Build" and "Clean" in the local menu of a web project in the projects window like this:

    <folder name="Projects">
        <folder name="Actions">
            <file name="org-netbeans-modules-gwt4nb-HostedModeAction.shadow">
                <attr name="originalFile"
                      stringvalue="Actions/Build/org-netbeans-modules-gwt4nb-HostedModeAction.instance"/>
                <attr name="position" intvalue="0"/>
            </file>
        </folder>
    </folder>


but this only places the action at the bottom of the menu
Comment 1 Jaroslav Tulach 2010-03-22 10:02:09 UTC
I don't think you can place your actions between build and clean.
Comment 2 Jesse Glick 2010-03-22 14:07:17 UTC
Projects/Actions is for "extra" actions which are shown in a section at the bottom of any cooperating project type. Currently most project types do not define their root node context menus in layers; if they did, you could register actions in particular places in the context menus of particular project types. See e.g. bug #182488 for j2seproject's.
Comment 3 Tim Lebedkov 2010-03-22 18:47:36 UTC
could you please tell why you "won't fix" this?
Comment 4 Jesse Glick 2010-03-22 18:57:57 UTC
Because it can only be done for particular project types individually (there is no missing infrastructure that I know of).
Comment 5 Tim Lebedkov 2010-03-22 21:08:53 UTC
OK. Let this issue be the one about web projects.
Comment 6 Jesse Glick 2010-03-25 00:54:37 UTC
Needs some prep work done in bug #182488. David says he can do it for EE project types in trunk after that branch is merged. Tech notes about things in web.project's context menu which do not exist in java.j2seproject:

if (provider != null && provider.hasVerifierSupport()) {...} - need to always include action in layer but conditionally disable (or hide, using new HIDE_WHEN_DISABLED property)

Utilities.actionsForPath("Projects/Rest_Actions_holder") - inline contents of that folder (it could then be deleted)

BrokenServerAction and BrokenDatasourceAction - need refactoring similar to BrokenLinksAction so they are self-contained, i.e. LVP impl does not hold references to them but rather keeps its own state and broadcasts changes to actions; then can create factories (placeholder ContextAwareAction) for them in layer

WebProjectConstants.COMMAND_REDEPLOY - need a new Actions/Project/*.instance defined I guess in api.web.webmodule
Comment 7 David Konecny 2010-04-09 02:38:57 UTC
Created attachment 96936 [details]
web project patch

Jesse, I changed web.project similarly to your changes in java proj. I will change other EE project types before pushing these changes.
Comment 8 Jesse Glick 2010-04-09 14:43:02 UTC
Looks good, though it is unfortunate that broken reference actions are so messy.
Comment 9 David Konecny 2010-04-13 00:42:24 UTC
Fixed in all EE project types - I refactored Web Project logical provider into an abstract one which is used from all EE project types - there were almost no differences. Next step would be to refactor org.netbeans.modules.j2ee.common.project.ui.AbstractLogicalViewProvider to java.api.common and share it with J2SE project type. TBD.
03c6611c051b
Comment 10 Tim Lebedkov 2010-05-06 21:50:54 UTC
-