Package org.bndtools.build.api

Examples of org.bndtools.build.api.BuildErrorDetailsHandler


                Position position = model.getPosition(annotation);
                if (isAtPosition(context.getOffset(), position)) {
                    IMarker marker = ((MarkerAnnotation) annotation).getMarker();
                    String errorType = marker.getAttribute("$bndType", null);
                    if (errorType != null) {
                        BuildErrorDetailsHandler handler = BuildErrorDetailsHandlers.INSTANCE.findHandler(errorType);
                        if (handler != null) {
                            proposals.addAll(handler.getProposals(marker));
                        }
                    }
                }
            }
        }
View Full Code Here


        String type = marker.getAttribute("$bndType", (String) null);
        if (type == null)
            return;

        BuildErrorDetailsHandler handler = BuildErrorDetailsHandlers.INSTANCE.findHandler(type);
        if (handler == null)
            return;

        List<ICompletionProposal> proposals = handler.getProposals(marker);
        if (proposals.isEmpty())
            return;

        IAction[] fixes = new IAction[proposals.size()];
View Full Code Here

    public IMarkerResolution[] getResolutions(IMarker marker) {
        String type = marker.getAttribute("$bndType", (String) null);
        if (type == null)
            return new IMarkerResolution[0];

        BuildErrorDetailsHandler handler = BuildErrorDetailsHandlers.INSTANCE.findHandler(type);
        if (handler == null)
            return new IMarkerResolution[0];

        List<IMarkerResolution> resolutions = handler.getResolutions(marker);
        return resolutions != null ? resolutions.toArray(new IMarkerResolution[resolutions.size()]) : new IMarkerResolution[0];
    }
View Full Code Here

    private void addBuildMarkers(String message, int severity) throws Exception {
        Location location = model != null ? model.getLocation(message) : null;
        if (location != null) {
            String type = location.details != null ? location.details.getClass().getName() : null;
            BuildErrorDetailsHandler handler = BuildErrorDetailsHandlers.INSTANCE.findHandler(type);

            List<MarkerData> markers = handler.generateMarkerData(getProject(), model, location);
            for (MarkerData markerData : markers) {
                IResource resource = markerData.getResource();
                //
                // TODO pkr: Just fixed an NPE java.lang.NullPointerException
                //                at org.bndtools.builder.NewBuilder.addBuildMarkers(NewBuilder.java:822)
View Full Code Here

    private void addBuildMarkers(String message, int severity) throws Exception {
        Location location = model != null ? model.getLocation(message) : null;
        if (location != null) {
            String type = location.details != null ? location.details.getClass().getName() : null;
            BuildErrorDetailsHandler handler = BuildErrorDetailsHandlers.INSTANCE.findHandler(type);

            List<MarkerData> markers = handler.generateMarkerData(getProject(), model, location);
            for (MarkerData markerData : markers) {
                IMarker marker = markerData.getResource().createMarker(BndtoolsConstants.MARKER_BND_PROBLEM);
                marker.setAttribute(IMarker.SEVERITY, severity);
                marker.setAttribute("$bndType", type);
                marker.setAttribute(BuildErrorDetailsHandler.PROP_HAS_RESOLUTIONS, markerData.hasResolutions());
View Full Code Here

        String type = marker.getAttribute("$bndType", (String) null);
        if (type == null)
            return;

        BuildErrorDetailsHandler handler = BuildErrorDetailsHandlers.INSTANCE.findHandler(type);
        if (handler == null)
            return;

        List<ICompletionProposal> proposals = handler.getProposals(marker);
        if (proposals.isEmpty())
            return;

        IAction[] fixes = new IAction[proposals.size()];
View Full Code Here

                Position position = model.getPosition(annotation);
                if (isAtPosition(context.getOffset(), position)) {
                    IMarker marker = ((MarkerAnnotation) annotation).getMarker();
                    String errorType = marker.getAttribute("$bndType", null);
                    if (errorType != null) {
                        BuildErrorDetailsHandler handler = BuildErrorDetailsHandlers.INSTANCE.findHandler(errorType);
                        if (handler != null) {
                            proposals.addAll(handler.getProposals(marker));
                        }
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.bndtools.build.api.BuildErrorDetailsHandler

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.