Skip to main content

LensStudio:Ui.IEditorsManager

Class

Interface for text editor management.

Index

Example

// IEditorsManager provides openEditors(entity) to open editors for an entity.
const em = this.pluginSystem.findInterface(IEditorsManager.interfaceId) as IEditorsManager;
if (Editor.isNull(em)) {
console.log('IEditorsManager not available');
return;
}

const model = this.pluginSystem.findInterface(
Editor.Model.IModel.interfaceId
) as Editor.Model.IModel;
if (Editor.isNull(model)) {
console.log('IModel not available');
return;
}

const scene = model.project.scene;
const roots = scene.rootSceneObjects;
if (roots.length > 0) {
// Open editors for the first root scene object
em.openEditors(roots[0]);
console.log('Opened editors for:', roots[0].name);
}

Extends

Extended by

Properties

interfaceId

static interfaceId: InterfaceId

Interface identifier for retrieving this plugin component.

Methods

getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

IPluginComponent.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

IPluginComponent.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

IPluginComponent.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

IPluginComponent.isSame


openEditors()

openEditors(entity, editorPluginIds?): void

Open editors for the specified entity with optional plugin-specific configurations.

Parameters

ParameterType
entityEntity
editorPluginIds?any

Returns

void