Package org.antlr.works.ate.gutter

Examples of org.antlr.works.ate.gutter.ATEGutterColumnManager


        int startIndex = textEditor.textPane.viewToModel(new Point(clip.x, clip.y));
        int endIndex = textEditor.textPane.viewToModel(new Point(clip.x+clip.width, clip.y+clip.height));

        items.clear();
        if(textEditor.gutterColumnsManager != null) {
            ATEGutterColumnManager manager = textEditor.gutterColumnsManager;
            int offsetX = offsetForLineNumber;
            for(String column : manager.getColumns()) {
                for (ATEGutterItem item : manager.getGutterItems(column)) {
                    int index = item.getItemIndex();
                    if (index >= startIndex && index <= endIndex) {
                        int y = getLineYPixelPosition(item.getItemIndex());
                        int width = item.getItemWidth();
                        int height = item.getItemHeight();
                        Rectangle r = new Rectangle(offsetX, y - height / 2, width, height);
                        this.items.add(new ItemInfo(item, r));
                    }
                }
                offsetX += manager.getColumnWidth(column);
            }
        }

        foldingInfos.clear();
        if(textEditor.foldingManager != null) {
View Full Code Here


    }

    private boolean handleClickInColumn(Point point) {
        if(textEditor.gutterColumnsManager == null) return false;

        ATEGutterColumnManager manager = textEditor.gutterColumnsManager;
        if(point.x < offsetForLineNumber) return false;

        String column = null;
        int width = offsetForLineNumber;
        for(String c : manager.getColumns()) {
            width += manager.getColumnWidth(c);
            if(point.x < width) {
                column = c;
                break;
            }
        }
        if(column == null) return false;

        // use only y-axis
        point.x = 0;
        int index = textEditor.textPane.viewToModel(point);

        return manager.handleClickInColumn(column, index);
    }
View Full Code Here

        // their position based on the changes done in the window.
        // The position might not be 100% accurate but at least it avoids
        // some ugly ui shift between a keystroke and the actual analysis
        // of the items
        if(textEditor.gutterColumnsManager != null) {
            ATEGutterColumnManager manager = textEditor.gutterColumnsManager;
            for(String column : manager.getColumns()) {
                for(ATEGutterItem item : manager.getGutterItems(column)) {
                    if(item.getItemIndex() > offset) {
                        item.setItemIndex(item.getItemIndex()+length);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.antlr.works.ate.gutter.ATEGutterColumnManager

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.