Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Problem still appears in List: msg#00024

java.findbugs.general

Subject: Re: Problem still appears in List

This is a multi-part message in MIME format.
Roth, Thomas schreef:
i use FindBug Eclipse Plugin. I've had the problem (..) After the following steps the problem still appears in the problem view list (..)
 
I've had to clean and rebuild the project. After this the problem no longer appears in the list.
Looks like you, too, are running into:

  http://sourceforge.net/tracker/index.php?func=detail&aid=1711828&group_id=96405&atid=614693

I worked around this by changing in FindbugsWorker.java:

if (Util.isJavaArtifact(res)) {
                res.deleteMarkers(
                    FindBugsMarker.NAME,
                    true,
                    IResource.DEPTH_INFINITE);
                IJavaElement ije = JavaCore.create(res);
                if (ije instanceof ClassFile)
                {
                    ClassFile cf = (ClassFile) ije;
                    String className = cf.getType().getFullyQualifiedName('.');
                    FindbugsPlugin.removeFromBugCollection(className, project, monitor);
                }
            }

and adding to FindbugsPlugin.java:

public static void removeFromBugCollection(String className, IProject project, IProgressMonitor monitor) throws CoreException {
            SortedBugCollection bc = getBugCollection(project, monitor);
            for (BugInstance bi : new ArrayList<BugInstance>(bc.getCollection()))
            {
                if (bi.getPrimaryClass().getClassName().indexOf(className) != -1)
                {
                    bc.remove(bi);
                }
            }
            project.setSessionProperty(SESSION_PROPERTY_BUG_COLLECTION, bc);
    }

This seems like a reasonable workaround for the short time - though it seems cf.getType().getFullyQualifiedName('.') does not, actually, return the full name (with package name), so this might potentially remove too many markers.

I probably won't have time to finish the solution and turn it into a proper patch the coming week, so if someone wants to take this up, please go ahead :)


Arnout


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation