Skip to main content

Editor.IPlugin

Class

Interface representing a plugin.

Index

Example

// A CoreService subclass is itself an IPlugin — `this` is the plugin
// instance. Use `this.pluginSystem` to resolve interfaces declared in
// the descriptor's `dependencies` array.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;

// React to the user switching projects (open/new) by registering a
// handler on onProjectChanged.
const conn = model.onProjectChanged.connect(() => {
console.log(`Plugin ${this.id}: switched to a new project`);
});
this.connections.push(conn);

Extends

Extended by

Properties

id

readonly id: string

Unique string identifier of the plugin instance.

Methods

getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

IInterface.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

IInterface.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

IInterface.isOfType


isSame()

isSame(other): boolean

Returns true if this object refers to the same instance as the given object.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

IInterface.isSame