Get the right-click menu items that this tool will add to the specified resource. Note that this implementation uses a cache so that the same items will be returned each time the menu is displayed. For a fully dynamic approach a subclass should override this method to simply call @{link {@link #buil
(NameBearerHandle handle)
| 64 | * to the right click menu of the specified handle |
| 65 | */ |
| 66 | public List<Action> getActions(NameBearerHandle handle) { |
| 67 | |
| 68 | if(!actions.containsKey(handle.getTarget())) { |
| 69 | // if we haven't seen this resource before then build the actions |
| 70 | actions.put(handle.getTarget(), buildActions(handle)); |
| 71 | } |
| 72 | |
| 73 | // return the actions from the cache |
| 74 | return actions.get(handle.getTarget()); |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Build the {@link javax.swing.Action} instances that should be used to |
nothing calls this directly
no test coverage detected