Preparing search index...

    Represents a project settings validation warning with a human-readable description.

    // ProjectSettings.Warning is passed to ProjectSettingsPlugin.setIssues()
    // to display a non-blocking warning next to the settings entry.
    // Use alongside ProjectSettings.Error and ProjectSettings.NoIssue.
    export class WarningExampleSettings extends ProjectSettingsPlugin {
    createWidget(parent: Widget): Widget {
    const root = new Widget(parent);
    const layout = new BoxLayout();
    layout.setDirection(Direction.TopToBottom);
    root.layout = layout;

    // Validate project configuration and report issues to the Project Settings UI.
    const issues: (ProjectSettings.Error | ProjectSettings.Warning | ProjectSettings.NoIssue)[] = [];
    if (targetVersionMismatch) {
    issues.push(new ProjectSettings.Warning('Lens target version mismatch detected.'));
    }
    if (missingRequiredAsset) {
    issues.push(new ProjectSettings.Error('Missing required asset reference.'));
    }
    if (issues.length === 0) {
    issues.push(new ProjectSettings.NoIssue());
    }
    this.setIssues(issues);

    return root;
    }
    }
    Index

    Constructors

    Properties

    Constructors

    • Constructs a Warning project settings validation result with the given description.

      Parameters

      • description: string

      Returns Warning

    Properties

    description: string

    The warning message text.