Examples of IErlModule


Examples of org.erlide.engine.model.erlang.IErlModule

                    final IErlFolder erlFolder = (IErlFolder) model.create(folder);
                    children.add(erlFolder);
                } else if (element instanceof IFile) {
                    final IFile file = (IFile) element;
                    if (CommonUtils.isErlangFileContentFileName(file.getName())) {
                        final IErlModule m = (IErlModule) model.create(file);
                        children.add(m);
                    }
                }
            }
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule

                final IErlFolder erlFolder = (IErlFolder) element;
                erlFolder.open(null);
                for (final IErlElement e : erlFolder
                        .getChildrenOfKind(ErlElementKind.MODULE)) {
                    if (e instanceof IErlModule) {
                        final IErlModule m = (IErlModule) e;
                        final boolean isModule = SourceKind.nameToModuleKind(m.getName()) != SourceKind.HRL;
                        if (isModule == getModules) {
                            result.add(m);
                        }
                    }
                }
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule

                final boolean isExternalOrProject = element.getKind() == ErlElementKind.EXTERNAL_ROOT
                        || element.getKind() == ErlElementKind.EXTERNAL_APP
                        || element.getKind() == ErlElementKind.EXTERNAL_FOLDER
                        || element.getKind() == ErlElementKind.PROJECT;
                if (element instanceof IErlModule) {
                    final IErlModule module = (IErlModule) element;
                    result.add(module);
                    return false;
                } else if (isExternalOrProject) {
                    final IErlElement ErlElement = element;
                    ErlElement.open(null);
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule

                final boolean isExternalOrProject = element.getKind() == ErlElementKind.EXTERNAL_ROOT
                        || element.getKind() == ErlElementKind.EXTERNAL_APP
                        || element.getKind() == ErlElementKind.EXTERNAL_FOLDER
                        || element.getKind() == ErlElementKind.PROJECT;
                if (element instanceof IErlModule) {
                    final IErlModule module = (IErlModule) element;
                    if (module.getSourceKind() == SourceKind.HRL) {
                        result.add(module);
                    }
                    return false;
                } else if (isExternalOrProject) {
                    final IErlElement ErlElement = element;
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule

                    continue;
                }
                // final String name = entry.getName();
                parent = pathToEntryMap.get(entry.getParentPath());
                if (entry.isModule()) {
                    final IErlModule module = model.getModuleFromFile(parent,
                            getNameFromPath(path), path, null, path);
                    parent.addChild(module);
                } else {
                    final String name = getNameFromExternalPath(path);
                    final ErlExternalReferenceEntry externalReferenceEntry = new ErlExternalReferenceEntry(
                            parent, name, path, true, includeDir);
                    pathToEntryMap.put(path, externalReferenceEntry);
                    externalReferenceEntry.open(pm);
                    parent.addChild(externalReferenceEntry);
                }
            }
        }
        if (otherItems != null) {
            if (parent == null) {
                parent = new ErlExternalReferenceEntry(this, rootName, "." + rootName
                        + ".", true, includeDir);
                addChild(parent);
            }
            for (final String path : otherItems) {
                final IErlModule module = model.getModuleFromFile(parent,
                        getNameFromPath(path), path, null, path);
                parent.addChild(module);
            }
        }
    }
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule

    public IContentAssistant getContentAssistant(final ISourceViewer sourceViewer) {
        final ContentAssistant contentAssistant = new ContentAssistant();
        contentAssistant
                .setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));

        final IErlModule module = getModule();
        final IErlProject project = getProject();
        contentAssistProcessor = new ErlContentAssistProcessor(sourceViewer, module,
                project, contentAssistant);
        contentAssistProcessorForStrings = new ErlStringContentAssistProcessor(
                sourceViewer, module, project, contentAssistant);
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule

    }

    @Override
    public IReconciler getReconciler(final ISourceViewer sourceViewer) {
        final ErlReconcilingStrategy strategy = new ErlReconcilingStrategy(null);
        final IErlModule module = null;
        final String path = null;
        final ErlReconciler reconciler = new ErlReconciler(strategy, true, true, path,
                module, null);
        reconciler.setProgressMonitor(new NullProgressMonitor());
        reconciler.setIsAllowedToModifyDocument(false);
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule

                        extLib, getLibName(dname), dname, true, includePath(dname));
                extLib.addChild(subdir);

                for (final OtpErlangObject fn : files.elements()) {
                    final String sfn = ((OtpErlangString) fn).stringValue();
                    final IErlModule ext = new ErlModule(subdir, getModuleName(sfn), sfn,
                            Charsets.ISO_8859_1.toString(), null);
                    subdir.addChild(ext);
                }
            }
        }
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule

    @Override
    protected IStructureComparator createStructureComparator(final Object element,
            final IDocument document0,
            final ISharedDocumentAdapter sharedDocumentAdapter,
            final IProgressMonitor monitor) throws CoreException {
        IErlModule module = null;
        final IErlModel model = ErlangEngine.getInstance().getModel();
        String s = "";
        IDocument document = document0;
        if (element instanceof ResourceNode) {
            final ResourceNode rn = (ResourceNode) element;
            final IResource r = rn.getResource();
            if (r instanceof IFile) {
                final IFile f = (IFile) r;
                final IErlElement e = model.findElement(r);
                if (e instanceof IErlModule) {
                    module = (IErlModule) e;
                }
                if (document == null) {
                    try {
                        s = readString(f.getContents());
                        document = new Document(s);
                    } catch (final CoreException e1) {
                    }
                }
            }
        } else if (document == null && element instanceof IStreamContentAccessor) {
            try {
                final InputStream contents = ((IStreamContentAccessor) element)
                        .getContents();
                try {
                    s = readString(contents);
                } finally {
                    try {
                        contents.close();
                    } catch (final IOException e) {
                    }
                }
                document = new Document(s);
            } catch (final CoreException ex) {
            }
        } else if (document != null) {
            s = document.get();
        }
        if (module == null) {
            String name = "comptemp";
            if (element instanceof ITypedElement) {
                final ITypedElement typedElement = (ITypedElement) element;
                name = typedElement.getName();
            }
            module = model.getModuleFromText(model, name, s, s);
        }
        ErlNode root = null;
        if (element != null && document != null) {
            try {
                module.open(null);
                root = new RootErlNode(document, element);
                recursiveMakeErlNodes(module, root, document);
            } catch (final ErlModelException e) {
                ErlLogger.warn(e);
            }
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule

    private boolean shouldCompileModule(final IProject project, final IResource source,
            final IResource beam, final boolean shouldCompile0, final IErlProject eprj)
            throws ErlModelException {
        boolean shouldCompile = shouldCompile0;
        final IErlModule m = eprj.getModule(source.getName());
        if (m != null) {
            final Collection<ErlangIncludeFile> incs = m.getIncludeFiles();
            for (final ErlangIncludeFile ifile : incs) {
                final IResource rifile = ResourceUtil.findResourceByName(project,
                        ifile.getFilename());
                if (rifile != null
                        && rifile.getLocalTimeStamp() > beam.getLocalTimeStamp()) {
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.