Package com.intellij.openapi.module

Examples of com.intellij.openapi.module.Module


    final AnalysisScope analysisScope = AnalyzeUtil.KEY.getData(dataContext);
    if (analysisScope != null) {
      return analysisScope;
    }

    final Module moduleContext = LangDataKeys.MODULE_CONTEXT.getData(dataContext);
    if (moduleContext != null) {
      return new AnalysisScope(moduleContext);
    }

    final Module [] modulesArray = LangDataKeys.MODULE_CONTEXT_ARRAY.getData(dataContext);
View Full Code Here


    final FindBugsWorker worker = new FindBugsWorker(project, true);

    // set aux classpath
    final Collection<VirtualFile> auxFiles = new ArrayList<VirtualFile>();
    for (final VirtualFile affectedFile : affectedFiles) {
      final Module module = compileContext.getModuleByFile(affectedFile);
      final VirtualFile[] files = IdeaUtilImpl.getProjectClasspath(module);
      auxFiles.addAll(Arrays.asList(files));
    }

    worker.configureAuxClasspathEntries(auxFiles.toArray(new VirtualFile[auxFiles.size()]));
View Full Code Here

    return ((ModuleComponentImpl) _plugin).getProjectPreferences();
  }


  private void updatePreferences() {
    final Module module = _plugin.getModule();
    if (module != null) {
      final boolean enabled = getProjectPreferences().isModuleConfigEnabled(module.getName());
      getEnableCheckbox().setSelected(enabled);
      _configPanel.setEnabled(enabled);
    }
  }
View Full Code Here

      _checkBox.setFocusable(false);
      _checkBox.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent e) {
          final boolean enabled = _checkBox.isSelected();
          getConfigPanel().setEnabled(enabled);
          final Module module = _plugin.getModule();
          if (module != null) {
            getProjectPreferences().enabledModuleConfig(module.getName(), enabled);
            getConfigPanel().setEnabled(enabled);
          }
        }
      });
      _checkBox.setBorder(BorderFactory.createEmptyBorder(20, 5, 20, 20));
View Full Code Here

  }


  private void initWorker() {
    final com.intellij.openapi.project.Project project = IdeaUtilImpl.getProject(_dataContext);
    final Module module = IdeaUtilImpl.getModule(_dataContext);

    final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
    if (Boolean.valueOf(preferences.getProperty(FindBugsPreferences.TOOLWINDOW_TO_FRONT))) {
      IdeaUtilImpl.activateToolWindow(getPluginInterface(project).getInternalToolWindowId(), _dataContext);
    }

    final FindBugsWorker worker = new FindBugsWorker(project, module);

    // set aux classpath
    final VirtualFile[] files = IdeaUtilImpl.getProjectClasspath(_dataContext);
    worker.configureAuxClasspathEntries(files);

    // set source dirs
    final VirtualFile[] sourceRoots = IdeaUtilImpl.getModulesSourceRoots(_dataContext);
    worker.configureSourceDirectories(sourceRoots);

    // set class files
    final VirtualFile compilerOutpath = IdeaUtilImpl.getCompilerOutputPath(module);
    if (compilerOutpath == null) {
      FindBugsPluginImpl.showToolWindowNotifier(project, "Compiler output path for module can not be null. check your module/project settings", MessageType.ERROR);
      return;
    }

    final String outPath = compilerOutpath.getPresentableUrl();
    worker.configureOutputFiles(outPath);
    worker.work("Running FindBugs analysis for module'" + module.getName() + "'...");

  }
View Full Code Here

   */
  @SuppressWarnings("HardcodedFileSeparator")
  @Nullable
  public static String getOutputClassFilePathForJavaFile(final PsiFileSystemItem psiFile, final Project project) {
    try {
      final Module module = IdeaUtilImpl.findModuleForPsiElement(psiFile, project);
      final VirtualFile virtualFile = psiFile.getVirtualFile();
      if (virtualFile == null) {
        LOGGER.warn("No virtual file for psi file: " + psiFile);
        return null;
      }
      final CompilerModuleExtension moduleExtension = CompilerModuleExtension.getInstance(module);
      if (moduleExtension == null) return null;
      String classPath;
      if (ProjectRootManager.getInstance(module.getProject()).getFileIndex().isInTestSourceContent(virtualFile)) {
        final VirtualFile pathForTests = moduleExtension.getCompilerOutputPathForTests();
        if (pathForTests == null) {
          LOGGER.warn("No compiler test output path for:" + virtualFile);
          return null;
        }
View Full Code Here

  }


  @Override
  protected void analyze(@NotNull final Project project, final AnalysisScope scope) {
    final Module module = IdeaUtilImpl.getModule(_dataContext);

    final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
    if (Boolean.valueOf(preferences.getProperty(FindBugsPreferences.TOOLWINDOW_TO_FRONT))) {
      IdeaUtilImpl.activateToolWindow(getPluginInterface(project).getInternalToolWindowId(), _dataContext);
    }
View Full Code Here

  }

  private static ProcessingItem[] run(CompileContext context,
                                      ProcessingItem[] items,
                                      HaxeApplicationConfiguration haxeApplicationConfiguration) {
    final Module module = haxeApplicationConfiguration.getConfigurationModule().getModule();
    if (module == null) {
      context.addMessage(CompilerMessageCategory.ERROR,
                         HaxeBundle.message("no.module.for.run.configuration", haxeApplicationConfiguration.getName()), null, -1, -1);
      return ProcessingItem.EMPTY_ARRAY;
    }
View Full Code Here

    return compiled;
  }

  private static int findProcessingItemIndexByModule(ProcessingItem[] items, RunConfigurationModule moduleConfiguration) {
    final Module module = moduleConfiguration.getModule();
    if (module == null || module.getModuleFile() == null) {
      return -1;
    }
    for (int i = 0; i < items.length; ++i) {
      if (module.getModuleFile().equals(items[i].getFile())) {
        return i;
      }
    }
    return -1;
  }
View Full Code Here

  @Override
  public void checkConfiguration() throws RuntimeConfigurationException {
    super.checkConfiguration();
    final HaxeApplicationModuleBasedConfiguration configurationModule = getConfigurationModule();
    final Module module = configurationModule.getModule();
    if (module == null) {
      throw new RuntimeConfigurationException(HaxeBundle.message("haxe.run.no.module", getName()));
    }
  }
View Full Code Here

TOP

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

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.