# Class: I

Defined in: | lib/Engine.coffee
Inherits: | Operation

## Overview

A simple insert-type operation.

An insert operation is always positioned between two other insert operations. Internally this is realized as associative lists, whereby each insert operation has a predecessor and a successor. For the sake of efficiency we maintain two lists: - The short-list (abbrev. sl) maintains only the operations that are not deleted - The complete-list (abbrev. cl) maintains all operations

## Direct Known Subclasses

Delimiter

## Instance Method Summary

- # (void) getLength() Retrieve the effective length of the $content of this operation.
- # (void) isDeleted() If isDeleted() is true this operation won't be maintained in the sl
- # (void) getDistanceToOrigin() The amount of positions that this operation was moved to the right.
- # (void) update_sl() Update the short list TODO
- # (void) toJson() Convert all relevant information of this operation into the json-format.
- # (void) execute(current_position) The result will be concatenated with the results from the other insert operations in order to retrieve the content of the engine.
- # (void) IT() Include this operation in the associative lists.

## Inherited Method Summary

### Methods inherited from Operation

#getUid #execute

## Constructor Details

# (void) constructor(content, creator, op_number, prev_cl, next_cl)

### Parameters:

- content ( `Value` ) — The value of the insert operation. E.g. for strings content is a char.
- creator ( `Object` ) — A unique user identifier
- op_number ( `Integer` ) — This Number was assigned via getOperationCounter().
- prev_cl ( `Operation` ) — The predecessor of this operation in the complete-list (cl)
- next_cl ( `Operation` ) — The successor of this operation in the complete-list (cl)

### See also:

- HistoryBuffer.getOperationCounter

## Instance Method Details

# (void) getLength()

Retrieve the effective length of the $content of this operation.

# (void) isDeleted()

If isDeleted() is true this operation won't be maintained in the sl

# (void) getDistanceToOrigin()

The amount of positions that this operation was moved to the right.

# (void) update_sl()

Update the short list TODO

# (void) toJson()

Convert all relevant information of this operation into the json-format. This result can be send to other clients.

# (void) execute(current_position)

The result will be concatenated with the results from the other insert operations in order to retrieve the content of the engine.

### See also:

- HistoryBuffer.toExecutedArray

# (void) IT()

Include this operation in the associative lists. (For historical reasons IT - Inclusion Transformation)

Quickly fuzzy find classes, mixins, methods, file:

- T Open fuzzy finder dialog

Control the navigation frame:

- L Toggle list view
- C Show class list
- I Show mixin list
- F Show file list
- M Show method list
- E Show extras list

You can focus and blur the search input:

- S Focus search input
- Esc Blur search input