| 649 | export class ContextKeyLessExpr implements IContextKeyExpression { |
| 650 | |
| 651 | public static create(key: string, value: any): ContextKeyExpression { |
| 652 | if (typeof value === 'boolean') { |
| 653 | return (value ? ContextKeyDefinedExpr.create(key) : ContextKeyNotExpr.create(key)); |
| 654 | } |
| 655 | const staticValue = STATIC_VALUES.get(key); |
| 656 | if (typeof staticValue === 'boolean') { |
| 657 | const trueValue = staticValue ? 'true' : 'false'; |
| 658 | return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE); |
| 659 | } |
| 660 | return new ContextKeyLessExpr(key, value); |
| 661 | } |
| 662 | |
| 663 | public readonly type = ContextKeyExprType.Less; |
| 664 | |