Examples of JSLibraryManager


Examples of com.intellij.lang.javascript.library.JSLibraryManager

                                     @NotNull final Collection<VirtualFile> libSourceFiles) {
    ApplicationManager.getApplication().runWriteAction(new Runnable() {

      @Override
      public void run() {
        JSLibraryManager jsLibraryManager = ServiceManager.getService(project, JSLibraryManager.class);
        ScriptingLibraryModel libraryModel = jsLibraryManager.createLibrary(
          JstdLibraryUtil.LIBRARY_NAME,
          VfsUtilCore.toVirtualFileArray(libSourceFiles),
          VirtualFile.EMPTY_ARRAY,
          ArrayUtil.EMPTY_STRING_ARRAY,
          ScriptingLibraryModel.LibraryLevel.GLOBAL,
          false
        );
        JSLibraryMappings jsLibraryMappings = ServiceManager.getService(project, JSLibraryMappings.class);
        jsLibraryMappings.associate(null, libraryModel.getName());
        jsLibraryManager.commitChanges();
      }
    });
  }
View Full Code Here

Examples of com.intellij.lang.javascript.library.JSLibraryManager

  private static void doInit(@NotNull final Project project) {
    ApplicationManager.getApplication().runReadAction(new Runnable() {
      @Override
      public void run() {
        JSLibraryManager libraryManager = JSLibraryManager.getInstance(project);
        LibraryTable libraryTable = libraryManager.getLibraryTable(ScriptingLibraryModel.LibraryLevel.GLOBAL);
        libraryTable.addListener(new MyLibraryChangeWatcher());
      }
    });
  }
View Full Code Here

Examples of com.intellij.lang.javascript.library.JSLibraryManager

            JstdDefaultAssertionFrameworkSrcMarker.class.getResource("TestCase.js")
          );
          if (libVirtualFile == null) {
            return false;
          }
          JSLibraryManager libraryManager = JSLibraryManager.getInstance(project);
          for (ScriptingLibraryModel libraryModel : libraryManager.getAllLibraries()) {
            if (libraryModel == null) {
              continue;
            }
            String libraryName = libraryModel.getName();
            if (libraryName != null && libraryName.startsWith(LIBRARY_NAME)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.