@Override
  @NotNull
  public JpsProject loadProject(@NotNull Path projectPath,
                                @Nullable Path externalConfigurationDirectory,
                                @NotNull Map<String, String> pathVariables,
                                boolean loadUnloadedModules) throws IOException {
    JpsSerializationViaWorkspaceModel serializationViaWorkspaceModel = JpsSerializationViaWorkspaceModel.getInstance();
    if (serializationViaWorkspaceModel != null) {
      return serializationViaWorkspaceModel.loadProject(projectPath, externalConfigurationDirectory, pathVariables, loadUnloadedModules);
    }

    JpsModel model = JpsElementFactory.getInstance().createModel();
    JpsProject project = model.getProject();
    JpsProjectLoader.loadProject(project, pathVariables, JpsPathMapper.IDENTITY, projectPath, loadUnloadedModules,
                                 externalConfigurationDirectory);
    return model.getProject();
  }
@Override
  @NotNull
  public JpsProject loadProject(@NotNull Path projectPath,
                                @Nullable Path externalConfigurationDirectory,
                                @NotNull Map<String, String> pathVariables,
                                boolean loadUnloadedModules)