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 155503 - Declerative way to add actions to TC and Mode
Summary: Declerative way to add actions to TC and Mode
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-15 21:12 UTC by mrmorris
Modified: 2010-10-13 12:43 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mrmorris 2008-12-15 21:12:09 UTC
There is currently no way to declaratively register actions globally, for specific modes or specific (foreign)
TopComponents. The ones already there appears to originate from org.netbeans.core.windows.actions.ActionUtils and cannot
be readily supplemented.
Comment 1 mrmorris 2008-12-15 21:12:46 UTC
It has been suggested on dev@openide that there be such folders for registering actions as per the usual practice using
layer files. Something along the line of:

# Global actions
Actions/

# Actions for all and any TopComponent tabs
Actions/TopComponentTabs/ 

# Actions for specific TopComponent tab
Actions/TopComponentTabs/com.some.path.TopComponentClassName/ 

# Actions for TopComponent tabs under a specific Mode
Actions/TopComponentTabs/${modeName}/

# Actions for specific TopComponent tab under a specific Mode
Actions/TopComponentTabs/${modeName}/com.some.path.TopComponentClassName/
Comment 2 Jaroslav Tulach 2010-10-13 12:43:04 UTC
I'd also suggest to add new method String TopComponent.getActionsPath() rather than using class name of the component.