Package org.bndtools.core.editors

Source Code of org.bndtools.core.editors.BndResourceMarkerAnnotationModel

package org.bndtools.core.editors;

import org.bndtools.build.api.BuildErrorDetailsHandler;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.ui.texteditor.MarkerAnnotation;
import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;

public class BndResourceMarkerAnnotationModel extends ResourceMarkerAnnotationModel {

    public BndResourceMarkerAnnotationModel(IResource resource) {
        super(resource);
    }

    @Override
    protected MarkerAnnotation createMarkerAnnotation(IMarker marker) {
        MarkerAnnotation annotation = super.createMarkerAnnotation(marker);

        boolean fixable = marker.getAttribute(BuildErrorDetailsHandler.PROP_HAS_RESOLUTIONS, false);
        annotation.setQuickFixable(fixable);

        return annotation;
    }

}
TOP

Related Classes of org.bndtools.core.editors.BndResourceMarkerAnnotationModel

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.