Package com.github.jknack.antlr4ide.lang

Examples of com.github.jknack.antlr4ide.lang.Grammar.eResource()


    URI resourceURI = URI.createURI("platform:/resource/project/G.g4");
    Resource resource = createMock(Resource.class);
    expect(resource.getURI()).andReturn(resourceURI);

    Grammar grammar = createMock(Grammar.class);
    expect(grammar.eResource()).andReturn(resource);

    Rule rule = createMock(Rule.class);
    expect(rule.getName()).andReturn(ruleName);
    expect(rule.eContainer()).andReturn(grammar);
View Full Code Here


    expect(delegate.eContainer()).andReturn(null).times(2);

    expect(delegate.eContainer()).andReturn(grammar);

    expect(grammar.eContainer()).andReturn(null);
    expect(grammar.eResource()).andReturn(resource);

    expect(resource.getURI()).andReturn(uri);

    expect(uri.lastSegment()).andReturn(name);
View Full Code Here

    Grammar grammar = createMock(Grammar.class);
    Resource resource = createMock(Resource.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "error");

    expect(grammar.eResource()).andReturn(resource);
    expect(grammar.getName()).andReturn("H");
    expect(resource.getURI()).andReturn(uri);

    PowerMock.expectPrivate(validator, "error", "grammar name 'H' and file name 'G.g4' differ",
        LangPackage.Literals.GRAMMAR__NAME, Antlr4Validator.GRAMMAR_NAME_DIFFER, "H", "G");
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.