Package org.bndtools.build.api

Examples of org.bndtools.build.api.MarkerData


        Map<String,Object> attribs = createMessageMarkerAttributes(baError, location.message);
        //Eclipse line numbers are 1 indexed
        attribs.put(IMarker.LINE_NUMBER, location.line + 1);

        // Add a marker to the bnd file on the BundleActivator line
        result.add(new MarkerData(getDefaultResource(project), attribs, false));

        MarkerData md;
        switch (baError.errorType) {
        case NO_SUITABLE_CONSTRUCTOR :
            md = createMethodMarkerData(javaProject, baError.activatorClassName, "<init>", "()V", createMessageMarkerAttributes(baError, location.message), false);
            if (md != null) {
                result.add(md);
View Full Code Here


                        attribs.put(IMarker.LINE_NUMBER, lineLoc.lineNum);
                        attribs.put(IMarker.CHAR_START, lineLoc.start);
                        attribs.put(IMarker.CHAR_END, lineLoc.end);
                    }

                    return Collections.singletonList(new MarkerData(pkgInfoFile, attribs, true));
                }
            }
        }

        return Collections.emptyList();
View Full Code Here

                    attribs.put(IMarker.CHAR_END, methodDecl.getStartPosition() + methodDecl.getLength());

                    String message = String.format("This method was added, which requires a %s change to the package.", requiresDelta);
                    attribs.put(IMarker.MESSAGE, message);

                    markers.add(new MarkerData(ast.getJavaElement().getResource(), attribs, false));
                }

                return false;
            }
        });
View Full Code Here

                        attribs.put(IMarker.CHAR_END, nameNode.getStartPosition() + nameNode.getLength());

                        String message = String.format("The method '%s' was removed, which requires a %s change to the package.", methodName, requiresDelta);
                        attribs.put(IMarker.MESSAGE, message);

                        markers.add(new MarkerData(ast.getJavaElement().getResource(), attribs, false));
                        return false;
                    }
                }
                return true;
            }
View Full Code Here

                        attribs.put(IMarker.LINE_NUMBER, lineLoc.lineNum);
                        attribs.put(IMarker.CHAR_START, lineLoc.start);
                        attribs.put(IMarker.CHAR_END, lineLoc.end);
                    }

                    return Collections.singletonList(new MarkerData(pkgInfoFile, attribs, true));
                }
            }
        }

        return Collections.emptyList();
View Full Code Here

                    attribs.put(IMarker.CHAR_END, methodDecl.getStartPosition() + methodDecl.getLength());

                    String message = String.format("This method was added, which requires a %s change to the package.", requiresDelta);
                    attribs.put(IMarker.MESSAGE, message);

                    markers.add(new MarkerData(ast.getJavaElement().getResource(), attribs, false));
                }

                return false;
            }
        });
View Full Code Here

                        attribs.put(IMarker.CHAR_END, nameNode.getStartPosition() + nameNode.getLength());

                        String message = String.format("The method '%s' was removed, which requires a %s change to the package.", methodName, requiresDelta);
                        attribs.put(IMarker.MESSAGE, message);

                        markers.add(new MarkerData(ast.getJavaElement().getResource(), attribs, false));
                        return false;
                    }
                }
                return true;
            }
View Full Code Here

                            qualifier = m.group(4);
                        }
                    }
                    attribs.put(PROP_SUGGESTED_VERSION, info.suggestedVersion.toString() + (qualifier != null ? '.' + qualifier : ""));

                    result.add(new MarkerData(bndFile, attribs, true));
                }
            }
        }

        return result;
View Full Code Here

        IJavaProject javaProject = JavaCore.create(project);

        Map<String,Object> attribs = new HashMap<String,Object>();
        attribs.put(IMarker.MESSAGE, location.message.trim());

        MarkerData md = null;
        if (dsError.className != null) {
            if (dsError.methodName != null && dsError.methodSignature != null) {
                md = createMethodMarkerData(javaProject, dsError.className, dsError.methodName, dsError.methodSignature, attribs, false);
            }

            if (md == null) {
                md = createTypeMarkerData(javaProject, dsError.className, attribs, false);
            }

        }

        if (md == null) {
            // No other marker could be created, so add a marker to the bnd file
            result.add(new MarkerData(getDefaultResource(project), attribs, false));
        }

        result.add(md);

        return result;
View Full Code Here

TOP

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

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.