Package org.apache.hivemind.impl

Examples of org.apache.hivemind.impl.LocationImpl


    {
        String path = "/" + getClass().getName().replace('.', '/');

        Resource r = new ClasspathResource(getClassResolver(), path);

        return new LocationImpl(r, line);
    }
View Full Code Here


{
    private Location makeLocation(int line)
    {
        Resource r = new ClasspathResource(new DefaultClassResolver(), "/foo/bar");

        return new LocationImpl(r, line);
    }
View Full Code Here

    }

    public void testParseExceptionWithLocation()
    {
        Resource r = getResource("MethodSubject.class");
        Location l = new LocationImpl(r, 3);

        MethodSubject s = new MethodSubject();
        s.setLocation(l);

        _m.put("*(", s);
View Full Code Here

        if (line != _currentLine || column != _currentColumn)
            _location = null;

        if (_location == null)
            _location = new LocationImpl(_resource, line, column);

        return _location;
    }
View Full Code Here

    protected void beforeParse(char[] templateData, ITemplateParserDelegate delegate,
            Resource resourceLocation)
    {
        _templateData = templateData;
        _resourceLocation = resourceLocation;
        _templateLocation = new LocationImpl(resourceLocation);
        _delegate = delegate;
        _ignoring = false;
        _line = 1;
        _componentAttributeName = delegate.getComponentAttributeName();
    }
View Full Code Here

            _blockStart = _cursor;

        while (true)
        {
            if (_cursor >= length)
                templateParseProblem(ParseMessages.commentNotEnded(startLine), new LocationImpl(
                        _resourceLocation, startLine), startLine, _cursor);

            if (lookahead(COMMENT_END))
                break;
View Full Code Here

        int length = _templateData.length;
        String tagName = null;
        boolean endOfTag = false;
        boolean emptyTag = false;
        int startLine = _line;
        Location startLocation = new LocationImpl(_resourceLocation, startLine);

        tagBeginEvent(startLine, _cursor);

        advance();
View Full Code Here

        // a body.

        boolean ignoreBody = !emptyTag && (isRemoveId || !allowBody);

        if (_ignoring && ignoreBody)
            templateParseProblem(ParseMessages.nestedIgnore(tagName, startLine), new LocationImpl(
                    _resourceLocation, startLine), startLine, cursorStart);

        if (!emptyTag)
            pushNewTag(tagName, startLine, isRemoveId, ignoreBody);
View Full Code Here

            throws TemplateParseException
    {
        if (_ignoring)
            templateParseProblem(
                    ParseMessages.contentBlockMayNotBeIgnored(tagName, startLine),
                    new LocationImpl(_resourceLocation, startLine),
                    startLine,
                    cursorStart);

        if (emptyTag)
            templateParseProblem(
                    ParseMessages.contentBlockMayNotBeEmpty(tagName, startLine),
                    new LocationImpl(_resourceLocation, startLine),
                    startLine,
                    cursorStart);

        _tokens.clear();
        _blockStart = -1;
View Full Code Here

     */

    protected Location getCurrentLocation()
    {
        if (_currentLocation == null)
            _currentLocation = new LocationImpl(_resourceLocation, _line);

        return _currentLocation;
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.impl.LocationImpl

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.