| 280 | } |
| 281 | |
| 282 | export class ContextKeyTrueExpr implements IContextKeyExpression { |
| 283 | public static INSTANCE = new ContextKeyTrueExpr(); |
| 284 | |
| 285 | public readonly type = ContextKeyExprType.True; |
| 286 | |
| 287 | protected constructor() { |
| 288 | } |
| 289 | |
| 290 | public cmp(other: ContextKeyExpression): number { |
| 291 | return this.type - other.type; |
| 292 | } |
| 293 | |
| 294 | public equals(other: ContextKeyExpression): boolean { |
| 295 | return (other.type === this.type); |
| 296 | } |
| 297 | |
| 298 | public evaluate(context: IContext): boolean { |
| 299 | return true; |
| 300 | } |
| 301 | |
| 302 | public serialize(): string { |
| 303 | return 'true'; |
| 304 | } |
| 305 | |
| 306 | public keys(): string[] { |
| 307 | return []; |
| 308 | } |
| 309 | |
| 310 | public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression { |
| 311 | return this; |
| 312 | } |
| 313 | |
| 314 | public negate(): ContextKeyExpression { |
| 315 | return ContextKeyFalseExpr.INSTANCE; |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | export class ContextKeyDefinedExpr implements IContextKeyExpression { |
| 320 | public static create(key: string): ContextKeyExpression { |
nothing calls this directly
no outgoing calls
no test coverage detected