Package org.erlide.engine.model.erlang

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


    @Override
    public IErlRecordField getFieldNamed(final String name) {
        try {
            for (final IErlElement e : getChildrenOfKind(ErlElementKind.RECORD_FIELD)) {
                if (e instanceof IErlRecordField) {
                    final IErlRecordField field = (IErlRecordField) e;
                    if (field.getFieldName().equals(name)) {
                        return field;
                    }
                }
            }
        } catch (final ErlModelException e) {
View Full Code Here


        }
        if (pd instanceof IErlRecordDef) {
            final List<ICompletionProposal> result = new ArrayList<ICompletionProposal>();
            try {
                for (final IErlElement i : pd.getChildren()) {
                    final IErlRecordField field = (IErlRecordField) i;
                    final String fieldName = field.getFieldName();
                    if (!fieldsSoFar.contains(fieldName)) {
                        addIfMatches(fieldName, prefix, offset, result);
                    }
                }
            } catch (final ErlModelException e) {
View Full Code Here

    @Override
    public IVariable getVariable(final int offset) throws DebugException {
        String name;
        if (record != null) {
            try {
                final IErlRecordField recordField = (IErlRecordField) record
                        .getChildren().get(offset);
                name = recordField.getFieldName();
            } catch (final ErlModelException e) {
                name = varName + ":" + offset;
            }
        } else {
            name = varName + ":" + offset;
View Full Code Here

        final OtpErlangTuple t = (OtpErlangTuple) o;
        b.append(t.elementAt(0)).append("#{");
        final int n = children.size();
        if (n > 0) {
            for (int i = 0; i < n; i++) {
                final IErlRecordField field = (IErlRecordField) children.get(i);
                b.append(field.getFieldName()).append('=')
                        .append(t.elementAt(i + 1).toString()).append(", ");
            }
            b.setLength(b.length() - 2);
        }
        b.append('}');
View Full Code Here

TOP

Related Classes of org.erlide.engine.model.erlang.IErlRecordField

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.