Home Reference Source Repository
public class | source

Main

The Minimap package provides an eagle-eye view of text buffers.

It also provides API for plugin packages that want to interact with the minimap and be available to the user through the minimap settings.

Method Summary

Public Methods
public

Activates the minimap package.

public

Deactivates the minimap package.

public

generatePlugin(template: string)

Opens the plugin generation view.

public

Returns the Minimap associated to the active TextEditor.

public

Returns the Minimap class

public

minimapForEditor(textEditor: TextEditor): Minimap

Returns the Minimap object associated to the passed-in TextEditor.

public

minimapForEditorElement(editorElement: TextEditorElement): Minimap

Returns the Minimap object associated to the passed-in TextEditorElement.

public

observeMinimaps(iterator: function(minimap: Minimap): void): Disposable

Calls a function for each present and future minimaps.

public

onDidActivate(callback: function(event: Object): void): Disposable

Registers a callback to listen to the did-activate event of the package.

public

onDidActivatePlugin(callback: function(event: Object): void): Disposable

Registers a callback to listen to the did-activate-plugin event of the package.

public

onDidAddPlugin(callback: function(event: Object): void): Disposable

Registers a callback to listen to the did-add-plugin event of the package.

public

onDidCreateMinimap(callback: function(event: Object): void): Disposable

Registers a callback to listen to the did-create-minimap event of the package.

public

onDidDeactivate(callback: function(event: Object): void): Disposable

Registers a callback to listen to the did-deactivate event of the package.

public

onDidDeactivatePlugin(callback: function(event: Object): void): Disposable

Registers a callback to listen to the did-deactivate-plugin event of the package.

public

onDidRemovePlugin(callback: function(event: Object): void): Disposable

Registers a callback to listen to the did-remove-plugin event of the package.

public

standAloneMinimapForEditor(textEditor: TextEditor): Minimap

Returns a new stand-alone {Minimap} for the passed-in TextEditor.

public

toggle()

Toggles the minimap display.

Public Methods

public activate() source

Activates the minimap package.

public deactivate() source

Deactivates the minimap package.

public generatePlugin(template: string) source

Opens the plugin generation view.

Params:

NameTypeAttributeDescription
template string

the name of the template to use

public getActiveMinimap(): Minimap source

Returns the Minimap associated to the active TextEditor.

Return:

Minimap

the active Minimap

public minimapClass(): Function source

Returns the Minimap class

Return:

Function

the Minimap class constructor

public minimapForEditor(textEditor: TextEditor): Minimap source

Returns the Minimap object associated to the passed-in TextEditor.

Params:

NameTypeAttributeDescription
textEditor TextEditor

a text editor

Return:

Minimap

the associated minimap

public minimapForEditorElement(editorElement: TextEditorElement): Minimap source

Returns the Minimap object associated to the passed-in TextEditorElement.

Params:

NameTypeAttributeDescription
editorElement TextEditorElement

a text editor element

Return:

Minimap

the associated minimap

public observeMinimaps(iterator: function(minimap: Minimap): void): Disposable source

Calls a function for each present and future minimaps.

Params:

NameTypeAttributeDescription
iterator function(minimap: Minimap): void

a function to call with the existing and future minimaps

Return:

Disposable

a disposable to unregister the observer

public onDidActivate(callback: function(event: Object): void): Disposable source

Registers a callback to listen to the did-activate event of the package.

Params:

NameTypeAttributeDescription
callback function(event: Object): void

the callback function

Return:

Disposable

a disposable to stop listening to the event

public onDidActivatePlugin(callback: function(event: Object): void): Disposable source

Registers a callback to listen to the did-activate-plugin event of the package.

Params:

NameTypeAttributeDescription
callback function(event: Object): void

the callback function

Return:

Disposable

a disposable to stop listening to the event

public onDidAddPlugin(callback: function(event: Object): void): Disposable source

Registers a callback to listen to the did-add-plugin event of the package.

Params:

NameTypeAttributeDescription
callback function(event: Object): void

the callback function

Return:

Disposable

a disposable to stop listening to the event

public onDidCreateMinimap(callback: function(event: Object): void): Disposable source

Registers a callback to listen to the did-create-minimap event of the package.

Params:

NameTypeAttributeDescription
callback function(event: Object): void

the callback function

Return:

Disposable

a disposable to stop listening to the event

public onDidDeactivate(callback: function(event: Object): void): Disposable source

Registers a callback to listen to the did-deactivate event of the package.

Params:

NameTypeAttributeDescription
callback function(event: Object): void

the callback function

Return:

Disposable

a disposable to stop listening to the event

public onDidDeactivatePlugin(callback: function(event: Object): void): Disposable source

Registers a callback to listen to the did-deactivate-plugin event of the package.

Params:

NameTypeAttributeDescription
callback function(event: Object): void

the callback function

Return:

Disposable

a disposable to stop listening to the event

public onDidRemovePlugin(callback: function(event: Object): void): Disposable source

Registers a callback to listen to the did-remove-plugin event of the package.

Params:

NameTypeAttributeDescription
callback function(event: Object): void

the callback function

Return:

Disposable

a disposable to stop listening to the event

public standAloneMinimapForEditor(textEditor: TextEditor): Minimap source

Returns a new stand-alone {Minimap} for the passed-in TextEditor.

Params:

NameTypeAttributeDescription
textEditor TextEditor

a text editor instance to create a minimap for

Return:

Minimap

a new stand-alone Minimap for the passed-in editor

public toggle() source

Toggles the minimap display.