C# Class Emmet.Engine.EmmetEditorCallbacks

Implementation of IEmmetEditor interface for JavaScript engine. See https://github.com/emmetio/emmet/blob/master/lib/interfaces/IEmmetEditor.js for details.
Afficher le fichier Open project: sergey-rybalkin/emmet.net Class Usage Examples

Méthodes publiques

Méthode Description
Attach ( IEmmetEditor editor ) : bool

Attaches this instance to the given code editor.

CreateSelection ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Creates selection from start to end character indexes. If end is omitted, this method should place caret and start index.

Detach ( ) : void

Detaches this instance from the editor window, cleans up any internal caches.

GetCarretPos ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current caret position.

GetContent ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callbacks. Returns the content of the current editor window.

GetCurrentLine ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns the content of the current line.

GetCurrentLineRange ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current line's start and end indexes as object with start and end properties.

GetFilePath ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current editor's file path.

GetProfileName ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current output profile name (see profile module). In most cases, this method should return null and let Emmet guess best profile name for current syntax and user data. In case you’re using advanced editor with access to syntax scopes (like Sublime Text 2), you can return syntax name for current scope. For example, you may return `line` profile when editor caret is inside string of programming language.

GetSelection ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current selection.

GetSelectionRange ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns character indexes of selected text: object with start and end properties.If there's no selection, should return object with start and end properties referring to current caret position.

GetSyntax ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Returns current editor's syntax mode.

Prompt ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Asks user to enter something.

ReplaceContent ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Replace editor's content or it's part (from start to end index). If value contains caret_placeholder, the editor will put caret into this position. If you skip start and end arguments, the whole target's content will be replaced with value. If you pass start argument only, the value will be placed at start string index of current content. If you pass start and end arguments, the corresponding substring of current target's content will be replaced with value.

SetCarretPos ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle

JavaScript callback. Set new caret position.

Method Details

Attach() public méthode

Attaches this instance to the given code editor.
public Attach ( IEmmetEditor editor ) : bool
editor IEmmetEditor Editor to attach to.
Résultat bool

CreateSelection() public méthode

JavaScript callback. Creates selection from start to end character indexes. If end is omitted, this method should place caret and start index.
public CreateSelection ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

Detach() public méthode

Detaches this instance from the editor window, cleans up any internal caches.
public Detach ( ) : void
Résultat void

GetCarretPos() public méthode

JavaScript callback. Returns current caret position.
public GetCarretPos ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

GetContent() public méthode

JavaScript callbacks. Returns the content of the current editor window.
public GetContent ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

GetCurrentLine() public méthode

JavaScript callback. Returns the content of the current line.
public GetCurrentLine ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

GetCurrentLineRange() public méthode

JavaScript callback. Returns current line's start and end indexes as object with start and end properties.
public GetCurrentLineRange ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

GetFilePath() public méthode

JavaScript callback. Returns current editor's file path.
public GetFilePath ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

GetProfileName() public méthode

JavaScript callback. Returns current output profile name (see profile module). In most cases, this method should return null and let Emmet guess best profile name for current syntax and user data. In case you’re using advanced editor with access to syntax scopes (like Sublime Text 2), you can return syntax name for current scope. For example, you may return `line` profile when editor caret is inside string of programming language.
public GetProfileName ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

GetSelection() public méthode

JavaScript callback. Returns current selection.
public GetSelection ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

GetSelectionRange() public méthode

JavaScript callback. Returns character indexes of selected text: object with start and end properties.If there's no selection, should return object with start and end properties referring to current caret position.
public GetSelectionRange ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

GetSyntax() public méthode

JavaScript callback. Returns current editor's syntax mode.
public GetSyntax ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

Prompt() public méthode

JavaScript callback. Asks user to enter something.
public Prompt ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

ReplaceContent() public méthode

JavaScript callback. Replace editor's content or it's part (from start to end index). If value contains caret_placeholder, the editor will put caret into this position. If you skip start and end arguments, the whole target's content will be replaced with value. If you pass start argument only, the value will be placed at start string index of current content. If you pass start and end arguments, the corresponding substring of current target's content will be replaced with value.
public ReplaceContent ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle

SetCarretPos() public méthode

JavaScript callback. Set new caret position.
public SetCarretPos ( V8Engine engine, bool isConstructCall, InternalHandle self ) : InternalHandle
engine V8.Net.V8Engine
isConstructCall bool
self InternalHandle
Résultat InternalHandle