Examples of IErlAttribute


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

        if (element instanceof IErlFunctionClause) {
            return true;
        } else if (element instanceof IErlPreprocessorDef) {
            return true;
        } else if (element instanceof IErlAttribute) {
            final IErlAttribute a = (IErlAttribute) element;
            return a.getName().startsWith("include");
        }
        return false;
    }
View Full Code Here

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

        }
        final List<ErlangIncludeFile> r = Lists.newArrayList();
        synchronized (getModelLock()) {
            for (final IErlElement m : internalGetChildren()) {
                if (m instanceof IErlAttribute) {
                    final IErlAttribute a = (IErlAttribute) m;
                    final OtpErlangObject v = a.getValue();
                    if (v instanceof OtpErlangString) {
                        final String s = ((OtpErlangString) v).stringValue();
                        if ("include".equals(a.getName())) {
                            r.add(new ErlangIncludeFile(false, s));
                        } else if ("include_lib".equals(a.getName())) {
                            r.add(new ErlangIncludeFile(true, s));
                        }
                    }
                }
            }
View Full Code Here

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

    @Override
    public boolean exportsAllFunctions() {
        try {
            for (final IErlElement e : getChildrenOfKind(ErlElementKind.ATTRIBUTE)) {
                if (e instanceof IErlAttribute) {
                    final IErlAttribute attr = (IErlAttribute) e;
                    if (attr.getName().equals("compile")) {
                        final OtpErlangObject value = attr.getValue();
                        if (value != null && value.equals(EXPORT_ALL)) {
                            return true;
                        }
                    }
                }
View Full Code Here

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

            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());
            }
        } else if (kind == ErlElementKind.RECORD_DEF || kind == ErlElementKind.MACRO_DEF) {
            final IErlPreprocessorDef pd = (IErlPreprocessorDef) e;
            sb.append(pd.getDefinedName());
        }
View Full Code Here

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

                out.println(fix(def.getDefinedName()));
            } else if (form instanceof IErlTypespec) {
                final IErlTypespec attribute = (IErlTypespec) form;
                out.println("TYPESPEC " + fix(attribute.getName()));
            } else if (form instanceof IErlAttribute) {
                final IErlAttribute attribute = (IErlAttribute) form;
                out.println(fix(attribute.getName()));
            } else if (form instanceof IErlFunction) {
                final IErlFunction function = (IErlFunction) form;
                int numClauses = function.getChildCount();
                numClauses = numClauses == 0 ? 1 : numClauses;
                out.println(fix(function.getName()) + " " + function.getArity() + " "
View Full Code Here

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

            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);
            }
        }
        return null;
    }
View Full Code Here

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

                scanner.dispose();
            }

            for (final IErlElement el : module
                    .getChildrenOfKind(ErlElementKind.ATTRIBUTE)) {
                final IErlAttribute attr = (IErlAttribute) el;
                if (attr.getName().equals("behaviour")
                        || attr.getName().equals("behavior")) {
                    if (attr.getValue().toString().contains("gen_refac")) {
                        return RefacType.ELEMENTARY;
                    } else if (attr.getValue().toString().contains("gen_composite_refac")) {
                        return RefacType.COMPOSITE;
                    }
                }
            }
            return null;
View Full Code Here

Examples of org.erlide.engine.new_model.IErlAttribute

      final Iterable<IErlAttribute> attrs = this.erlFile.getAttributes();
      int _length_3 = ((Object[])Conversions.unwrapArray(attrs, Object.class)).length;
      Matcher<Integer> _is_3 = Matchers.<Integer>is(Integer.valueOf(2));
      MatcherAssert.<Integer>assertThat(Integer.valueOf(_length_3), _is_3);
      Iterable<IErlAttribute> _attributesWithTag = this.erlFile.getAttributesWithTag("module");
      IErlAttribute _head = IterableExtensions.<IErlAttribute>head(attrs);
      Matcher<Iterable<? extends IErlAttribute>> _contains = Matchers.<IErlAttribute>contains(_head);
      MatcherAssert.<Iterable<IErlAttribute>>assertThat(_attributesWithTag, _contains);
      Iterable<IErlAttribute> _attributesWithTag_1 = this.erlFile.getAttributesWithTag("export");
      Iterable<IErlAttribute> _tail = IterableExtensions.<IErlAttribute>tail(attrs);
      IErlAttribute _head_1 = IterableExtensions.<IErlAttribute>head(_tail);
      Matcher<Iterable<? extends IErlAttribute>> _contains_1 = Matchers.<IErlAttribute>contains(_head_1);
      MatcherAssert.<Iterable<IErlAttribute>>assertThat(_attributesWithTag_1, _contains_1);
      final Iterable<IErlFunction> funs = this.erlFile.getFunctions();
      int _length_4 = ((Object[])Conversions.unwrapArray(funs, Object.class)).length;
      Matcher<Integer> _is_4 = Matchers.<Integer>is(Integer.valueOf(3));
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.