/**
  * {@inheritdoc}
  */
 public function calculateDependencies()
 {
     $this->dependencies += parent::calculateDependencies();
     $this->addDependency('module', $this->getEntityType()->getProvider());
     // @todo This should definitely be the responsibility of the index class,
     //   this is nothing specific to the datasource.
     $fields = array();
     foreach ($this->getIndex()->getFields() as $field) {
         if ($field->getDatasourceId() === $this->pluginId) {
             $fields[] = $field->getPropertyPath();
         }
     }
     if ($field_dependencies = $this->getFieldDependencies($this->getEntityTypeId(), $fields)) {
         $this->addDependencies(array('config' => $field_dependencies));
     }
     return $this->dependencies;
 }