Action menu

Use the Action menu in the source editor to perform an action with a code structure such as a symbol or switch statement. The actions displayed in the menu are specific to the element, such as renaming a symbol, or adding a case to a switch statement. Hold the Command key and move the pointer around your code to highlight the different structures. To show the Action menu pop-up, Command-click the highlighted structure.

Action

Description

Jump to Definition

Open the file containing the declaration of a symbol.

Show Quick Help

Open the Quick Help for a symbol.

Callers

Jump to a line of code that calls a function or method.

Edit All in Scope

Edit all occurrences of the selected symbol inside the current scope.

For example, change the name of variable in a method, or edit the name of a property in a class.

Fold

Hide the structure by collapsing the lines that contain the structure.

Add […]

Add an appropriate element to the structure.

For example, add a method to a class, an else clause to an if statement, or a parameter to a method or function.

Extract […]

Extract the structure to a function or expression.

Extracting to a function creates a new function that contains the structure and inserts the name of the new function in place of the original structure.

Extracting to a variable inserts a statement that assigns the result of the structure to a new variable and replaces the original structure with the name of the new variable.

Rename

Rename all occurrences of the selected symbol in all the source code, Interface Builder, and Core Data files of the project.