Theia API Documentation v1.74.0
    Preparing search index...
    interface PerspectiveService {
        onDidChangePerspective: Event<string>;
        getActivePerspective(): undefined | PerspectiveDescriptor;
        getActivePerspectiveId(): string;
        getAreaForView(viewId: string): undefined | Area;
        getRegisteredPerspectives(): PerspectiveDescriptor[];
        registerPerspective(descriptor: PerspectiveDescriptor): void;
        resetCurrentPerspective(): Promise<void>;
        switchPerspective(id: string): Promise<void>;
    }

    Implemented by

    Index

    Properties

    onDidChangePerspective: Event<string>

    Event fired whenever the active perspective changes. The payload is the new perspective ID.

    Methods

    • Resets the active perspective to its programmatic state (viewPlacements from its descriptor), discarding the saved layout. Does not affect other perspectives.

      Returns Promise<void>

    • Switches the workbench to the given perspective. Saves the current perspective's layout, then restores the target perspective's layout (or applies its viewPlacements on first activation). Concurrent calls are serialized.

      Parameters

      • id: string

      Returns Promise<void>