@Override
  public JpsJavaDependencyExtension getDependencyExtension(@NotNull JpsDependencyElement dependency) {
    JpsModule module = dependency.getContainingModule();
    if (module.getProject() instanceof JpsJavaAwareProject) {
      return ((JpsJavaAwareProject)module.getProject()).getJavaDependencyExtension(dependency);
    }
    return dependency.getContainer().getChild(JpsJavaDependencyExtensionRole.INSTANCE);
  }
@Override
  public JpsJavaDependencyExtension getDependencyExtension(@NotNull JpsDependencyElement dependency)