Examples of BadLocationException


Examples of org.eclipse.jface.text.BadLocationException

            top = Math.max(0, Math.min(lines - 1, top));
            bottom = Math.max(0, Math.min(lines - 1, bottom));

            int start = document.getLineOffset(top);
            if (start == -1)
                throw new BadLocationException("Start line -1");
            int end = document.getLineOffset(bottom);
            if (end == -1 || end < start)
                throw new BadLocationException("End line -1 or less than start");
            SarosAnnotation annotation = new ViewportAnnotation(source);
            Position position = new Position(start, end - start);
            model.addAnnotation(annotation, position);
        } catch (BadLocationException e) {
            log.warn("Internal Error:", e);
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.