Package com.intellij.openapi.module

Examples of com.intellij.openapi.module.Module


    private class AddDependencyToIdeaRunnable implements Runnable {
        protected final LibraryTablesRegistrar libTableMgr = LibraryTablesRegistrar.getInstance();

        public void run() {
            final Project project = problem.getProject();
            final Module module = problem.getModule();
            final LibraryTable libTable = libTableMgr.getLibraryTable(project);

            //
            //if a library with the name of the dependency already exists,
            //use it. Otherwise, create a new one
View Full Code Here


      return VfsUtil.isAncestor((VirtualFile) filterValue.getElement(), vFile, false);
    }

    if (filterValue instanceof CustomModuleNodeDescriptor)
    {
      Module module = (Module) filterValue.getElement();
      VirtualFile[] roots = ModuleRootManager.getInstance(module).getContentRoots();

      for (VirtualFile root : roots)
      {
        if (VfsUtil.isAncestor(root, vFile, false))
View Full Code Here

      if (node != null)
      {
        return node;
      }

      Module module = moduleRoots.get(vFile);

      Project project = RevuUtils.getProject();
      DefaultMutableTreeNode parentNode;
      if (module == null)
      {
View Full Code Here

        }, ModalityState.any());

        VirtualFile file = psiFile.getVirtualFile();
        if (file == null)
            return null;
        Module module = DeclarationPosition.getDeclModule(psiFile);
        if (module == null)
            return null;
        List<GHCMessage> ghcMessages = LaunchGHC.compile(null, file.getPath(), module, true);
        return new AnnotationResult(file, ghcMessages);
    }
View Full Code Here

                case STATISTICS:
                    break;
                }
                if (out != null) {
                    if (message.startsWith("Not in scope")) {
                        Module module = DeclarationPosition.getDeclModule(psiFile);
                        String symbol = psiFile.getText().substring(range.getStartOffset(), range.getEndOffset());
                        int dotIndex = symbol.lastIndexOf('.');
                        String unqualifiedSymbol = dotIndex >= 0 ? symbol.substring(dotIndex + 1) : symbol;
                        if (userImports == null) {
                            userImports = listUserImports(module, Paths.get(path));
View Full Code Here

        if (files.length == 0)
            return true;

        Set<Module> modules = new HashSet<Module>();
        for (VirtualFile file : files) {
            Module module = DeclarationPosition.getModule(project, file);
            if (module != null) {
                modules.add(module);
            }
        }

        Set<Module> noGhcModules = new HashSet<Module>();
        for (Module module : modules) {
            if (!isAcceptableModuleType(module))
                continue;
            Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
            if (sdk == null || !(sdk.getSdkType() instanceof HaskellSdkType)) {
                noGhcModules.add(module);
            }
        }

        if (!noGhcModules.isEmpty()) {
            if (noGhcModules.size() == 1) {
                Module module = noGhcModules.iterator().next();
                Messages.showErrorDialog(
                    project,
                    MessageFormat.format("Cannot compile Haskell files.\nPlease set up GHC for module ''{0}''.", module.getName()),
                    "Cannot Compile"
                );
            } else {
                StringBuilder buf = new StringBuilder();
                int i = 0;
                for (Module module : noGhcModules) {
                    if (i > 0)
                        buf.append(", ");
                    buf.append(module.getName());
                    i++;
                }
                Messages.showErrorDialog(
                    project,
                    MessageFormat.format("Cannot compile Haskell files.\nPlease set up GHC for modules ''{0}''.", buf.toString()),
View Full Code Here

    private static Block doCreateModel(PsiElement element) throws IOException, InterruptedException, NoMatchException {
        final PsiFile file = element.getContainingFile();
        VirtualFile virtualFile = file.getVirtualFile();
        if (virtualFile == null)
            return null;
        Module module = DeclarationPosition.getDeclModule(file);
        CompilerLocation compiler = CompilerLocation.get(module);
        if (compiler == null)
            return null;
        List<String> args = compiler.getCompileOptionsList(
            "-m", "ParseTree",
View Full Code Here

    public void setMainFile(HaskellFile mainFile) {
        VirtualFile file = mainFile.getVirtualFile();
        if (file != null) {
            this.mainFile = file.getUrl();
            Module module = DeclarationPosition.getDeclModule(mainFile);
            setModule(module);
        }
    }
View Full Code Here

        return myParams;
    }

    private HaskellParameters createHaskellParameters() {
        HaskellParameters params = new HaskellParameters();
        Module module = configuration.getModule();
        if (module == null) {
            return null;
        }
        ProgramParametersUtil.configureConfiguration(params, configuration);
        params.configureByModule(module);
View Full Code Here

        // todo: run in event-dispatch thread
        //fdm.saveAllDocuments();
        // try this: PsiDocumentManager.getInstance(getProject()).commitAllDocuments();
        int offset = range.getStartOffset();
        LineCol coord = LineCol.fromOffset(psiFile, offset);
        Module module = DeclarationPosition.getDeclModule(psiFile);
        if (module == null)
            return null;
        CompilerLocation compiler = CompilerLocation.get(module);
        if (compiler == null) {
            return null;
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.