"use strict";
/*
 * Copyright (C) 2018 TypeFox and others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var inversify_1 = require("inversify");
var browser_1 = require("@wiptheia/editor/lib/browser");
var common_1 = require("../common");
var JavaKeybindingContexts;
(function (JavaKeybindingContexts) {
    JavaKeybindingContexts.javaEditorTextFocus = 'javaEditorTextFocus';
})(JavaKeybindingContexts = exports.JavaKeybindingContexts || (exports.JavaKeybindingContexts = {}));
var JavaEditorTextFocusContext = /** @class */ (function (_super) {
    __extends(JavaEditorTextFocusContext, _super);
    function JavaEditorTextFocusContext() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.id = JavaKeybindingContexts.javaEditorTextFocus;
        return _this;
    }
    JavaEditorTextFocusContext.prototype.canHandle = function (widget) {
        return _super.prototype.canHandle.call(this, widget) && widget.editor.document.languageId === common_1.JAVA_LANGUAGE_ID;
    };
    JavaEditorTextFocusContext = __decorate([
        inversify_1.injectable()
    ], JavaEditorTextFocusContext);
    return JavaEditorTextFocusContext;
}(browser_1.EditorTextFocusContext));
exports.JavaEditorTextFocusContext = JavaEditorTextFocusContext;
//# sourceMappingURL=java-keybinding-contexts.js.map