Package org.erlide.engine.internal.model.erlang

Examples of org.erlide.engine.internal.model.erlang.ErlAttribute


            final OtpErlangAtom u = (OtpErlangAtom) o;
            if ("u".equals(u.atomValue())) {
                o = null;
            }
        }
        final ErlAttribute a = new ErlAttribute(module, nameS, o, Util.stringValue(extra));
        setPos(a, pos);
        // a.setParseTree(val);
        return a;
    }
View Full Code Here


    private IErlAttribute addModuleAttribute(final IErlModule module,
            final OtpErlangObject pos, final OtpErlangAtom value,
            final OtpErlangObject extra, final String nameS) {
        final String s = Util.stringValue(extra);
        final ErlAttribute r = new ErlAttribute(module, nameS, value, s);
        setPos(r, pos);
        return r;
    }
View Full Code Here

    @Test
    public void addChild() throws Exception {
        module.open(null);
        final int childCount = module.getChildCount();
        final String aname = "test_a";
        final IErlAttribute attribute = new ErlAttribute(module, aname, null, "test");
        module.addChild(attribute);
        final int childCount2 = module.getChildCount();
        final IErlElement childNamed = module.getChildNamed(aname);
        assertEquals(childCount + 1, childCount2);
        assertEquals(attribute, childNamed);
View Full Code Here

    @Test
    public void setChildren() throws Exception {
        module.open(null);
        final List<IErlElement> children = module.getChildren();
        final String aname = "test_a";
        final IErlAttribute attribute = new ErlAttribute(module, aname, null, "test");
        module.setChildren(Lists.newArrayList(attribute));
        final int childCount = module.getChildCount();
        final List<IErlElement> children2 = module.getChildren();
        final IErlElement element = children2.iterator().next();
        assertEquals(1, childCount);
View Full Code Here

    IPath _tmpPath = this.getTmpPath(projectName);
    return this.createProject(projectName, _tmpPath);
  }
 
  public IErlElement createErlAttribute(final IErlElement parent, final String name, final OtpErlangObject value, final String extra, final int sourceRangeOffset, final int sourceRangeLength) {
    final ErlAttribute attribute = new ErlAttribute(parent, name, value, extra);
    attribute.setSourceRangeOffset(sourceRangeOffset);
    attribute.setSourceRangeLength(sourceRangeLength);
    return attribute;
  }
View Full Code Here

TOP

Related Classes of org.erlide.engine.internal.model.erlang.ErlAttribute

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.