Protocol

XCSourceEditorCommand

The protocol you implement to handle command invocations in a source editor extension.

Declaration

@protocol XCSourceEditorCommand

Overview

A one-to-one mapping between command classes and commands is not required—multiple commands can be handled by a single class, by checking their invocation’s commandIdentifier at runtime.

Topics

Defining Editor Commands

XCSourceEditorCommandDefinitionKey

A key in the dictionary that defines a source editor command.

Handling Editor Commands

- performCommandWithInvocation:completionHandler:

Performs the action associated with the command using the information in an invocation.

Required.

Relationships

Inherits From

See Also

Editor Commands

XCSourceEditorCommandInvocation

An object that identifies the command issued to your extension and provides the contents of the active source editor.