if (pattern != null) { System.out.println("Pattern detail text: " + pattern.getDetailText()); String detailText = pattern.getDetailText(); }
if (pattern != null){ marker.setAttribute("shortDescription",pattern.getShortDescription()); marker.setAttribute("detailText",pattern.getDetailText()); }
	protected void doReportBug(BugInstance bug) {		getBugList().add(bug);				String className = null;		String packageName = null;		if (bug.getPrimaryClass() != null) {			className = bug.getPrimaryClass().getClassName();			packageName = bug.getPrimaryClass().getPackageName();		}				if (DEBUG) {			System.out.println("BUG in class: " + packageName + "." + className + ": " + bug.getMessage() + " / Annotation: " + bug.getAnnotationText() + " / Source Line: " + bug.getPrimarySourceLineAnnotation());		}				IResource resource = getUnderlyingResource(bug);		if (resource != null) {			int startLine = bug.getPrimarySourceLineAnnotation().getStartLine();						if (DEBUG) {				System.out.println("Creating marker for " + resource.getLocation() + ": line " + startLine);			}			try {//				HashMap attributes = new HashMap();//				IJavaElement element = JavaCore.create(resource);//				JavaCore.addJavaElementMarkerAttributes(attributes, element);//				attributes.put(IMarker.LINE_NUMBER, new Integer(startLine));//				attributes.put(IMarker.MESSAGE, bug.getMessage());//				attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));//				IMarker marker = resource.createMarker(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER);//				marker.setAttributes(attributes);								IMarker marker = resource.createMarker(FindBugsMarker.NAME);				marker.setAttribute(IMarker.LINE_NUMBER, startLine);								BugPattern pattern = I18N.instance().lookupBugPattern(bug.getType());				if (pattern != null) {					System.out.println("Pattern detail text: " + pattern.getDetailText());					String detailText = pattern.getDetailText();				}				marker.setAttribute(IMarker.MESSAGE, bug.getMessage());				marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);			}			catch (CoreException e) {				e.printStackTrace();			}					}						advanceProgressMonitor();	}