Examples of ISourceElementInfo


Examples of org.eclipse.handly.model.ISourceElementInfo

     * @return <code>true</code> if the element was successfully revealed in the
     *         editor; <code>false</code> otherwise
     */
    public static boolean revealInTextEditor(final ITextEditor textEditor,
            final ISourceElement element) {
        ISourceElementInfo info;
        try {
            info = element.getSourceElementInfo();
        } catch (final CoreException e) {
            if (!element.exists()) {
                // this is considered normal
            } else {
                ErlLogger.error(e);
            }
            return false;
        }
        final TextRange identifyingRange = info.getIdentifyingRange();
        if (identifyingRange.isNull()) {
            return false;
        }
        textEditor.selectAndReveal(identifyingRange.getOffset(),
                identifyingRange.getLength());
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.