Search in sources :

Example 1 with JarFileMarkerAnnotationModel

use of org.eclipse.xtext.ui.editor.model.JarFileMarkerAnnotationModel in project xtext-eclipse by eclipse.

the class XbaseDocumentProvider method createAnnotationModel.

@Override
protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
    if (element instanceof IEditorInput) {
        IEditorInput editorInput = (IEditorInput) element;
        SourceRelativeURI breakpointURI = breakpointUtil.getBreakpointURI(editorInput);
        if (breakpointURI != null) {
            // we only get a URI here if the EditorInput points into a JAR
            IResource breakpointResource = breakpointUtil.getBreakpointResource(editorInput);
            return new JarFileMarkerAnnotationModel(breakpointResource, breakpointURI);
        }
    }
    return super.createAnnotationModel(element);
}
Also used : JarFileMarkerAnnotationModel(org.eclipse.xtext.ui.editor.model.JarFileMarkerAnnotationModel) SourceRelativeURI(org.eclipse.xtext.generator.trace.SourceRelativeURI) IEditorInput(org.eclipse.ui.IEditorInput) IResource(org.eclipse.core.resources.IResource)

Aggregations

IResource (org.eclipse.core.resources.IResource)1 IEditorInput (org.eclipse.ui.IEditorInput)1 SourceRelativeURI (org.eclipse.xtext.generator.trace.SourceRelativeURI)1 JarFileMarkerAnnotationModel (org.eclipse.xtext.ui.editor.model.JarFileMarkerAnnotationModel)1