Examples of IErlFunctionClause


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

        sb.append(kind);
        if (kind == ErlElementKind.FUNCTION) {
            final IErlFunction f = (IErlFunction) e;
            sb.append(f.getNameWithArity());
        } else if (kind == ErlElementKind.CLAUSE) {
            final IErlFunctionClause fc = (IErlFunctionClause) e;
            sb.append(fc.getHead());
        } else if (kind == ErlElementKind.ATTRIBUTE) {
            final IErlAttribute a = (IErlAttribute) e;
            sb.append(a.getName());
            if (a.getValue() != null) {
                sb.append(a.getValue().toString());
View Full Code Here

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

            if (m != null) {
                try {
                    m.open(null);
                    final IErlElement e = m.getElementAtLine(lineNumber);
                    if (e instanceof IErlFunctionClause) {
                        final IErlFunctionClause clause = (IErlFunctionClause) e;
                        clauseHead = clause.getName() + clause.getHead();
                    }
                } catch (final ErlModelException e1) {
                    ErlLogger.warn(e1);
                }
            }
View Full Code Here

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

            if (e instanceof IErlModule) {
                final IErlModule m = (IErlModule) e;
                return m.getModuleName() + "\t\t- "
                        + e.getResource().getFullPath().toString();
            } else if (e instanceof IErlFunctionClause) {
                final IErlFunctionClause fc = (IErlFunctionClause) e;
                return ErlangEngine.getInstance().getModelUtilService().getModule(fc)
                        .getModuleName()
                        + ":" + fc.toString();
            }
            return e.toString();
        }
View Full Code Here

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

        } else if (element instanceof IErlRecordDef) {
            final IErlRecordDef r = (IErlRecordDef) element;
            final String unquoted = StringUtils.unquote(r.getDefinedName());
            return new RecordPattern(unquoted, limitTo);
        } else if (element instanceof IErlFunctionClause) {
            final IErlFunctionClause clause = (IErlFunctionClause) element;
            return getSearchPatternFromErlElementAndLimitTo(clause.getParent(), limitTo);
        } else if (element instanceof IErlAttribute) {
            final IErlAttribute a = (IErlAttribute) element;
            if (a.getName().startsWith("include")) {
                final String s = Util.stringValue(a.getValue());
                return new IncludePattern(s, limitTo);
View Full Code Here

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

            final OtpErlangList erlangFunctionList = (OtpErlangList) restuple
                    .elementAt(1);
            for (int i = 0; i < erlangFunctionList.arity(); ++i) {
                final OtpErlangTuple fTuple = (OtpErlangTuple) erlangFunctionList
                        .elementAt(i);
                IErlFunctionClause f;
                try {
                    f = extractFunction(fTuple);
                    elements.add(f);
                } catch (final ErlModelException e) {
                }
View Full Code Here

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

    private IErlFunctionClause extractFunction(final OtpErlangTuple fTuple)
            throws OtpErlangRangeException, ErlModelException {
        final IErlModule mod = extractModule(fTuple.elementAt(0));
        final String function = ((OtpErlangAtom) fTuple.elementAt(1)).atomValue();
        final int arity = ((OtpErlangLong) fTuple.elementAt(2)).intValue();
        final IErlFunctionClause f = ErlangEngine.getInstance().getModel()
                .findFunction(new FunctionRef(mod.getModuleName(), function, arity));
        return f;
    }
View Full Code Here

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

            try {
                module.open(null);
                if (lineNumber != -1) {
                    final IErlElement e = module.getElementAtLine(lineNumber - 1);
                    if (e instanceof IErlFunctionClause) {
                        final IErlFunctionClause clause = (IErlFunctionClause) e;
                        clauseHead = clause.getFunctionName() + clause.getHead();
                    }
                } else if (function != null) {
                    final IErlFunction f = module.findFunction(function);
                    if (f != null) {
                        lineNumber = f.getLineStart() + 1;
View Full Code Here

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

                dialog.open();
                dialog.resetSelection();

                if (dialog.isFinished()) {
                    final IErlFunctionClause functionClause = dialog.getFunctionClause();
                    refactoring = new FoldRemoteExpressionRefactoring(functionClause, sel);
                    pages.add(new SelectionInputPage("Fold expression",
                            "Please select expression which should be fold!",
                            "Select expressions which should be folded!",
                            (CostumWorkflowRefactoringWithPositionsSelection) refactoring));
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.