[description]
@return {Promise} [description]
190462
function () {
    if (!this.mapper.hasObject(this.modelElement.path())) {
      const resolver = this.node.getKevoreeCore().getResolver();
      return resolver.resolve(this.modelElement)
        .then((Type) => {
          this.log.debug(
            'namespace=' + ModelHelper.getNamespace(this.modelElement.eContainer()) +
            ',hash=' + this.modelElement.hashcode +
            ',name=' + this.modelElement.name +
            ',version=' + this.modelElement.version);
          this.mapper.addEntry(this.modelElement.path(), Type);
        });
    } else {
      // this deploy unit is already installed, move on
      return Promise.resolve();
    }
  }
519097
function PromiseCache () {
  var cache = this.cache = {};

  this.get = function (key, promiseGenerator) {
    if (key in cache) {
      return cache[key];
    }
    cache[key] = promiseGenerator();
    return cache[key];
  };
}
1257463
function() {
        return new Promise(function(resolve, reject) {
            VkSdkLoginManager.authorize(function(error, result) {
                if (error) {
                    reject(error);
                } else {
                    resolve(result);
                }
            });
        });
    }
209656
function getAPIJSONPromise(oChainObject) {
		return new Promise(function(oResolve, oReject) {
			fs.readFile(sInputFile, 'utf8', (oError, sFileData) => {
				if (oError) {
					oReject(oError);
				} else {
					oChainObject.fileData = JSON.parse(sFileData);
					oResolve(oChainObject);
				}
			});
		});
	}
564522
function reversePromises (promises) {
    return promises.map(function (promise) {
      var d = $q.defer();
      promise.then(d.reject, d.resolve);
      return d.promise;
    });
  }
1212677
function() {
                var deferred = $.Deferred();
                if (this.isStale) {
                    this.setPage(1)
                        .done(function() {
                            deferred.resolve();
                        });
                } else {
                    deferred.resolve();
                }
                return deferred.promise();
            }
434282
function( obj ) {
					if ( obj == null ) {
						obj = promise;
					} else {
						for ( var key in promise ) {
							obj[ key ] = promise[ key ];
						}
					}
					return obj;
				}
91056
function promisedRequest(params, callback) {
  var deferred = Promise.defer();
  var req;
  var createRequest = function() {
    if (!req) {
      req = request(params, function(err, response) {
        if (err) {
          deferred.reject(err);
        } else {
          deferred.resolve(response);
        }
      });
    }
    return req;
  };
  return streamify(deferred.promise, createRequest).thenCall(callback);
}
628892
function () {
	    	var deferred = $q.defer();
	    	var promise = deferred.promise;
            
            function ok(value){
                deferred.resolve(value);
            }
            
            function errorCallback(error){
                deferred.reject(new Error(error));
            }
            
            if($window.plugins){
                $window.plugins.appPreferences.show()
                    .then(ok, errorCallback);
            } else {
                deferred.reject(new Error(this.pluginNotEnabledMessage));
            }
	    	
	    	this.decoratePromise(promise);
	    	return promise;
	    }
693889
function execPromise (fn) {
  return new Promise(function (resolve) {
    resolve(fn(process.argv.slice(2)))
  }).then(onSuccess, onError)
}
251030
public static final Promise resolve() {
		return new Promise(CompletableFuture.completedFuture(new Tree((Tree) null, null, null)));
	}
642438
function asPromise (fn) {
  return new Promise((resolve, reject) => {
    fn((err, result) => {
      if (err) {
        return reject(err)
      }
      resolve(result)
    })
  })
}
397089
function exec() {
    var defer = q.defer();
    cp.exec(this, function(err, stdout, stderr) {
        if (err) console.log('exec err: '+ err);
        console.log(stdout);
        defer.resolve(err)
    })
    return defer.promise;
}
348340
function(){
    return this.get('/featured', {
      'cc': this.options.country,
      'l': this.options.language
    }).then(function (body) {
      console.log('featured - ', body)
      return Promise.resolve(body);
    });
  }
67307
function Request(options) {
  return new Promise(function(resolve, reject) {
    client(options, function(err, res) {
      if (err) {
        reject(err);
      } else {
        resolve(res);
      }
    });
  });
}
777497
function promisedRequest(url) {
	var taskId = this[0], req = Object.create(this[1]);
	var method = req.method || 'get';

	if ('args' in req) {
		req.url = url + taskId + find_separator(url) + req.args
	}
	else {
		req.url = url + taskId
	}

	return new Promise(function(resolve, reject) {
		return request[method](req, function(err, response, body) {
			return err ? reject({error: err, headers: response && response.headers})
				: resolve({body: body, headers: response.headers});
		});
	});
}
1128877
function promiseWrap(x) {
  if(x.then && typeof x.then === "function") {
    return x;    
  }
  var deferred = q.defer();
  deferred.resolve(x);
  return deferred.promise;
}