Package com.intellij.openapi.module

Examples of com.intellij.openapi.module.ModuleManager


     */
    private static final Res RES = Res.getInstance(SynchronizeWithModuleActionGroup.class);

    public SynchronizeWithModuleActionGroup(final Project pProject) {
        super("Synchronize POM with module", true);
        final ModuleManager moduleMgr = ModuleManager.getInstance(pProject);
        final Module[] modules = moduleMgr.getModules();
        for (Module module : modules)
            add(new SynchronizeWithModuleAction(module));

        moduleMgr.addModuleListener(new ModuleListener() {
            public void moduleAdded(Project project, Module module) {
                add(new SynchronizeWithModuleAction(module));
            }

            public void beforeModuleRemoved(Project project, Module module) {
View Full Code Here


    public void applyChanges() throws ConfigurationException {
        Project project = getConfiguration().getProject();
        ProjectConnectionBundle projectConnectionManager = ProjectConnectionBundle.getInstance(project);
        projectConnectionManager.apply();

        ModuleManager moduleManager = ModuleManager.getInstance(project);
        Module[] modules = moduleManager.getModules();
        for (Module module : modules) {
            ModuleConnectionBundle.getInstance(module).apply();
        }
    }
View Full Code Here

    public void resetChanges() {
        Project project = getConfiguration().getProject();
        ProjectConnectionBundle projectConnectionManager = ProjectConnectionBundle.getInstance(project);
        projectConnectionManager.reset();

        ModuleManager moduleManager = ModuleManager.getInstance(project);
        Module[] modules = moduleManager.getModules();
        for (Module module : modules) {
            ModuleConnectionBundle.getInstance(module).reset();
        }
    }
View Full Code Here

  }


  @NotNull
  private static Module[] getModules(final Project project) {
    final ModuleManager moduleManager = ModuleManager.getInstance(project);
    return moduleManager.getModules();
  }
View Full Code Here

    LibraryTable libraryTable = registrar.getLibraryTable();
    return libraryTable.getLibraries();
  }

  private Library[] getModuleLibraries(Project project) {
    ModuleManager moduleManager = ModuleManager.getInstance(project);
    Module[] modules = moduleManager.getModules();
    List<Library> moduleLibraries = new ArrayList<Library>();
    for (Module module : modules) {
      ModuleRootManager rootManager = ModuleRootManager.getInstance(module);
      ModifiableRootModel rootModel = rootManager.getModifiableModel();
      LibraryTable libraryTable = rootModel.getModuleLibraryTable();
View Full Code Here

    private void doImport(@NotNull final Collection<DataNode<IdeaAndroidUnitTest>> toImport, @NotNull final Project project, boolean synchronous) {
        ExternalSystemApiUtil.executeProjectChangeAction(synchronous, new DisposeAwareProjectChange(project) {
            @Override
            public void execute() {
                Map<String, IdeaAndroidUnitTest> androidProjectsByModuleName = indexByModuleName(toImport);
                ModuleManager moduleManager = ModuleManager.getInstance(project);
                for (Module module : moduleManager.getModules()) {
                    IdeaAndroidUnitTest androidProject = androidProjectsByModuleName.get(module.getName());
                    customizeModule(module, project, androidProject);
                }
            }
        });
View Full Code Here

                                  @Nullable String project,
                                  @NotNull List<Message> errorsFound) {
        if (project == null || project.isEmpty()) return;
        ModuleDependency dependency = new ModuleDependency(project, DependencyScope.TEST);

        ModuleManager moduleManager = ModuleManager.getInstance(model.getProject());
        Module moduleDependency = null;
        for (Module module : moduleManager.getModules()) {
            AndroidGradleFacet androidGradleFacet = AndroidGradleFacet.getInstance(module);
            if (androidGradleFacet != null) {
                String gradlePath = androidGradleFacet.getConfiguration().GRADLE_PROJECT_PATH;
                if (Objects.equal(gradlePath, dependency.getGradlePath())) {
                    moduleDependency = module;
View Full Code Here

    }

    @SuppressWarnings({"unchecked", "ConstantConditions"})
    @Test
    public void testDetectFacet() {
        ModuleManager moduleManager = ModuleManager.getInstance(fixture.getProject());
        Module t0 = moduleManager.findModuleByName("t0");

        OsmorcFrameworkDetector detector = new OsmorcFrameworkDetector();

        ElementPattern<FileContent> filter = detector.createSuitableFilePattern();
View Full Code Here

    }

     @SuppressWarnings({"unchecked", "ConstantConditions"})
    @Test
    public void testDetectBundlorFacet() {
        ModuleManager moduleManager = ModuleManager.getInstance(fixture.getProject());
        Module t2 = moduleManager.findModuleByName("t2");
        final OsmorcFrameworkDetector detector = new OsmorcFrameworkDetector();

        ElementPattern<FileContent> filter = detector.createSuitableFilePattern();

        VirtualFile manifestFile = myTempDirFixture.getFile("t2/src/META-INF/template.mf");
View Full Code Here

  @NotNull
  @Override
  public Module[] getModules() {
    List<Module> modules = new ArrayList<Module>();

    ModuleManager moduleManager = ModuleManager.getInstance(getProject());
    for (SelectedBundle selectedBundle : getBundlesToDeploy()) {
      if (selectedBundle.isModule()) {
        Module module = moduleManager.findModuleByName(selectedBundle.getName());
        if (module != null) {
          modules.add(module);
        }
        else {
          LOG.error("no module [" + selectedBundle.getName() + "]");
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.