Search in sources :

Example 1 with ScriptingLibraryManager

use of com.intellij.webcore.libraries.ScriptingLibraryManager in project intellij-plugins by JetBrains.

the class JstdResolveTest method removeLibrary.

private static void removeLibrary(@NotNull final Project project) {
    ApplicationManager.getApplication().runWriteAction(() -> {
        ScriptingLibraryManager libraryManager = ServiceManager.getService(project, JSLibraryManager.class);
        ScriptingLibraryModel model = libraryManager.getLibraryByName(JstdLibraryUtil.LIBRARY_NAME);
        assert model != null;
        libraryManager.removeLibrary(model);
        libraryManager.commitChanges();
    });
}
Also used : ScriptingLibraryModel(com.intellij.webcore.libraries.ScriptingLibraryModel) ScriptingLibraryManager(com.intellij.webcore.libraries.ScriptingLibraryManager)

Aggregations

ScriptingLibraryManager (com.intellij.webcore.libraries.ScriptingLibraryManager)1 ScriptingLibraryModel (com.intellij.webcore.libraries.ScriptingLibraryModel)1