20070208

The global action list is the only place you can see all of the actions throughout your application. So why is this important? It is the only place that lets you do the following things:



Edit an action.

Description

The developer would like to edit the properties of an action. If the developer is currently editing the form which uses the action then the developer can select the component which uses the action and open the action property editor. If the developer is not currently editing that form, or does not know which form(s) use the action, then the developer can use the Global Action List instead.

Scenario

  • Developer wants to edit the properties of the foo action.
  • Developer opens the Actions window from the Window menu
  • Developer finds the foo action by filtering or sorting the table in the Actions window
  • Developer selects the foo action's row with the mouse.
  • Developer presses the Edit Action button.
  • The Action Property Editor dialog opens.
  • The developer changes properties of the action then presses the Okay button to save the changes.
  • The Action Property Editor dialog closes and the table is updated to reflect the action's changes.
  • As an alternative to using the Edit Action button the developer can also double click on the action's row to open the Action Property Editor dialog.


Add an action

Description

The developer would like to create a new action which will go in a particular class.

Scenario

  • Developer wants to create the new action doStuff which will be implemented by method doStuff() in the myapp.Foo class.
  • Developer opens the Actions window from the Window menu
  • Developer presses the New Action button at the bottom of the Actions window.
  • The Create New Action dialog appears.
  • The developer selects a target class using the class chooser
  • The developer enters the name of the new action in the name field.
  • The developer does not select the Scope. That combobox is disabled.
  • The developer selects the 'Asynchronous' checkbox if they want the created Action to generate a background task.
  • The developer presses the Create button.
  • A new action is created in the right class, the Create New Action dialog disappears, the Action table is reloaded, and the new action is selected in the table.



Delete an action.

Description

The developer wishes to delete an action and all references to it. This includes resource entries that the action uses as well as the action property of a component in any form throughout the application which uses this action. The Global Action List is the only way to delete an action other than by manually searching for an editing comopnents, deleting resources and deleting the @Action annotation.

Scenario.

  • Developer wants to delete action foo.
  • Developer opens the Actions window from the Window menu
  • Developer finds the foo action by filtering or sorting the table in the Actions window
  • Developer selects the foo action row of the table with the mouse
  • Developer presses the delete button to delete the selected action.
  • A dialog appears asking if the developer really wants to delete the action. The developer selects 'okay'.
  • NB loads every form with a component which uses the foo action and sets the action properties to null and saves the forms.
  • NB loads the resource bundle for the foo action and deletes all properties for the foo action and saves the resource bundle.
  • NB loads the class which contains the annotated method for the foo action then deletes the annotation (but not the method) then saves the class.



Jump to the form used by the action (without this list you can only do the reverse)

Description

Actions can be used by multiple components spread across multiple forms. The Global Action List allows a developer to see all components which use a given action and navigate to them.

Scenario

  • developer wants to see all components that use action _foo_
  • developer opens the global action list from the window menu
  • developer searches for the foo action
  • developer sees the list of forms and components attached to the foo action in the 'components' column.
  • developer clicks on a link within the components column for the component the developer wishes to view
  • the editor loads and switches to the correct form
  • the editor selects the correct component



Find actions with missing icons

Description

The developer is polishing the application and notices that some actions in the menus don't have icons. The developer wants to find all actions without icons and set them.

Scenario

  • Developer wants to find all actions missing icons and set them
  • developer opens the Actions window from the Window menu
  • developer sees all actions from all classes in the action table
  • developer clicks on the header of the icon column to sort by icon
  • the table re-sorts to show all actions with icons at the top and all actions without an icon at the bottom
  • the developer scrolls down to the actions without icons
  • the developer double clicks on the first action missing an icon to open the Action Property Editor
  • The developer sets the icon from the Action Property Editor dialog then presses Okay
  • The developer double clicks on the next action missing an icon to repeat the process for all the remaining icon-less actions.




Find all actions used by form or class

Description

The developer wishes to see which actions are used by the myapp.Bar form. Note, this scenario needs work. Since all forms and components will be listed in the same cell the developer will only be able to sort by the first form in the cell.

Scenario

  • Developer opens the Actions window from the Window menu
  • Developer sees all actions from all classes in the action table
  • Developer clicks on the header of the component column to sort by component
  • The table re-sorts by the name of the first form.component in the column
  • The developer scrolls down to find the myapp.Bar form. All actions attached to this form will be listed in that area, ordered by name.
  • Alternatively the developer can narrow down the list of actions by typing Bar or myapp or myapp.Bar into the search field.



Find all components used by an action

Description

The developer wishes to see all components used by an action.

Scenario

  • The developer opens the Actions window from the Window menu
  • The developer searches for the action using the search field and the class selector
  • After finding the right action the developer looks at the 'components' column to see all components which use this action.


Find actions which are not used anywhere

Description

The developer wishes to see which actions are unused so that they can be assigned or deleted.

Scenario

  • Developer opens the Actions window from the Window menu
  • Developer sees all actions from all classes in the action table
  • Developer clicks on the header of the component column to sort by component
  • The table re-sorts to show all actions with components at the top and all actions without components at the bottom
  • The developer scrolls down to the actions without components
  • At this point the developer can either note the actions missing components and attach them to components later from the design view
  • Or the developer can delete the action by selecting it in the table and pressing the Delete Action button.


Other resources

Though it does not do this currently (in the NB 6 timeframe), in the future it will let you see all resources, not just actions, and filter/sort them by locale and platform.

Open an existing project written by someone else and see all actions.

When picking up an existing project a developer needs a way to get an idea of what is in this project. How is it structured.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo