"use strict";
/*
 * Copyright (C) 2017 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 __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 uri_1 = require("@wiptheia/core/lib/common/uri");
var index_1 = require("../common/index");
var inversify_1 = require("inversify");
var JavaLabelProviderContribution = /** @class */ (function () {
    function JavaLabelProviderContribution() {
    }
    JavaLabelProviderContribution.prototype.canHandle = function (element) {
        if (element instanceof uri_1.default && element.scheme === index_1.JAVA_SCHEME) {
            return 30;
        }
        else {
            return -1;
        }
    };
    /**
     * returns an icon class for the given element.
     */
    JavaLabelProviderContribution.prototype.getIcon = function (element) {
        return 'java-icon';
    };
    /**
     * returns a short name for the given element.
     */
    JavaLabelProviderContribution.prototype.getName = function (element) {
        return element.displayName;
    };
    /**
     * returns a long name for the given element.
     */
    JavaLabelProviderContribution.prototype.getLongName = function (element) {
        return element.path.toString();
    };
    JavaLabelProviderContribution = __decorate([
        inversify_1.injectable()
    ], JavaLabelProviderContribution);
    return JavaLabelProviderContribution;
}());
exports.JavaLabelProviderContribution = JavaLabelProviderContribution;
//# sourceMappingURL=java-label-provider.js.map