Package com.intellij.openapi.module

Examples of com.intellij.openapi.module.ModuleManager


        AccessToken token = ApplicationManager.getApplication().acquireReadActionLock();
        try {
          Set<SelectedBundle> selectedBundles = new HashSet<SelectedBundle>();
          // the bundles are module names, by now we try to find jar files in the output directory which we can then install
          ModuleManager moduleManager = ModuleManager.getInstance(myRunConfiguration.getProject());
          int bundleCount = myRunConfiguration.getBundlesToDeploy().size();
          for (int i = 0; i < bundleCount; i++) {
            progressIndicator.setFraction((double)i / bundleCount);

            SelectedBundle selectedBundle = myRunConfiguration.getBundlesToDeploy().get(i);
            if (selectedBundle.isModule()) {
              // use the output jar name if it is a module
              String name = selectedBundle.getName();
              Module module = moduleManager.findModuleByName(name);
              if (module == null) {
                throw new CantRunException("Module '" + name + "' no longer exists. Please check your run configuration.");
              }
              OsmorcFacet facet = OsmorcFacet.getInstance(module);
              if (facet == null) {
View Full Code Here


    assertNotNull(psiFile);
    return psiFile;
  }

  public static ModuleRootManager getModuleRootManager(Project project, String moduleName) {
    ModuleManager moduleManager = ModuleManager.getInstance(project);
    Module module = moduleManager.findModuleByName(moduleName);
    assertNotNull(module);
    return ModuleRootManager.getInstance(module);
  }
View Full Code Here

    super.setUp();
    myModulesToDispose.clear();
  }

  protected void tearDown() throws Exception {
    final ModuleManager moduleManager = ModuleManager.getInstance(myProject);
    ApplicationManager.getApplication().runWriteAction(new Runnable() {
      public void run() {
        for (Module module : myModulesToDispose) {
          String moduleName = module.getName();
          if (moduleManager.findModuleByName(moduleName) != null) {
            moduleManager.disposeModule(module);
          }
        }
      }
    });
    myModulesToDispose.clear();
View Full Code Here

    private final static Logger log = Logger.getInstance(AlfrescoSourceLinkingAction.class);

    public void actionPerformed(AnActionEvent e) {
        Project project = e.getProject();
        if (null == project) return;
        ModuleManager manager = ModuleManager.getInstance(project);
        Module[] modules = manager.getModules();
        for (Module module : modules) {
            log.info("Checking Module: " + module.getName());
            ModuleRootManager rootManager = ModuleRootManager.getInstance(module);
            OrderEntry[] entries = rootManager.getOrderEntries();
            for (OrderEntry entry : entries) {
View Full Code Here

TOP

Related Classes of com.intellij.openapi.module.ModuleManager

Copyright © 2018 www.massapicom. 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.