Package com.salesforce.ide.ui.editors.apex.util.ParserLocationTranslator

Examples of com.salesforce.ide.ui.editors.apex.util.ParserLocationTranslator.HighlightRange


    /*
     * Tries to highlight in the editor if we have a valid location
     */
    protected HighlightRange highlightTokenInEditorIfPossible(RealLoc loc) {
        HighlightRange range;
        try {
            range = ParserLocationTranslator.computeHighlightRange(loc, fEditor.getDocument());
            fEditor.setSelection(range, true);
            return range;
        } catch (BadLocationException e) {
View Full Code Here


     * Tries to place the cursor on the token (0-length selection) if we have a valid location
     */
    protected HighlightRange placeCursorOnLineIfPossible(RealLoc loc) {
        try {
            int startOffset = ParserLocationTranslator.getStartOffset(loc, fEditor.getDocument());
            HighlightRange range = new HighlightRange(startOffset, 0);
            fEditor.setSelection(range, true);
            return range;
        } catch (BadLocationException e) {
            return null;
        }
View Full Code Here

TOP

Related Classes of com.salesforce.ide.ui.editors.apex.util.ParserLocationTranslator.HighlightRange

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.