Examples of ErlangCompositeElement


Examples of org.intellij.erlang.psi.ErlangCompositeElement

      @Override
      public void visitModule(@NotNull ErlangModule o) {
        String ext = FileUtilRt.getExtension(o.getContainingFile().getName());
        String withoutExtension = FileUtil.getNameWithoutExtension(o.getContainingFile().getName());
        String moduleName = StringUtil.replace(o.getName(), "'", "");
        ErlangCompositeElement atom = o.getQAtom();
        if (atom != null && !StringUtil.equals(moduleName, withoutExtension)) {
          holder.registerProblem(atom, "Module with name '" + moduleName + "' should be declared in a file named '" +
              moduleName + "." + ext + "'.",
            new ErlangRenameModuleFix(withoutExtension),
            new ErlangRenameFileFix()
View Full Code Here

Examples of org.intellij.erlang.psi.ErlangCompositeElement

        ErlangFile erlangModule = ErlangModulesUtil.getErlangModuleFile(project, module);
        if (erlangModule == null) return null;

        //TODO use fun expression name to improve resolution (?)
        ErlangFunction function = erlangModule.getFunction(functionName, functionArity);
        ErlangCompositeElement clarifyingElement = inFunExpression && function != null ?
          ErlangPsiImplUtil.findFunExpression(function, funExpressionArity) : function;

        VirtualFile virtualFile = erlangModule.getVirtualFile();
        int offset = clarifyingElement != null ? clarifyingElement.getTextOffset() : 0;

        return XDebuggerUtil.getInstance().createPositionByOffset(virtualFile, offset);
      }
    });
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.