Search in sources :

Example 1 with GoProjectLibrariesService

use of com.goide.project.GoProjectLibrariesService in project go-lang-idea-plugin by go-lang-plugin-org.

the class GoProjectModelConverterProvider method addProjectDirToLibraries.

private static void addProjectDirToLibraries(@NotNull File file, @NotNull Element rootElement) throws CannotConvertException {
    GoProjectLibrariesService librariesService = new GoProjectLibrariesService();
    librariesService.setLibraryRootUrls("file://$PROJECT_DIR$");
    Element componentElement = JDomSerializationUtil.findOrCreateComponentElement(rootElement, GoConstants.GO_LIBRARIES_SERVICE_NAME);
    XmlSerializer.serializeInto(librariesService.getState(), componentElement);
    saveFile(file, rootElement, "Cannot save libraries settings");
}
Also used : Element(org.jdom.Element) GoProjectLibrariesService(com.goide.project.GoProjectLibrariesService)

Aggregations

GoProjectLibrariesService (com.goide.project.GoProjectLibrariesService)1 Element (org.jdom.Element)1