[Checkers] Eclipse Plugin (sorry)

Mahmood Ali mahmood at MIT.EDU
Thu Jun 19 21:03:23 EDT 2008


[ Please disregard the last email.  It was sent by mistake ]

Hi Adam,

I just had a chance to go through your plug-in.  I finally got it to  
work, after having some hiccups.  Unfortunately, it took me an  
extended period of time to get to work.

Here are my notes from the experience (some are related to the plug-in  
itself, and some are about using eclipse).

My goal of this afternoon was to get the plug-in to work on my Mac  
using Java 5.

::Technical Eclipse issues::
- The plug-in was importing the checkers.jar and had references to it  
in Run*CheckerActions.  This required checkers.jar to be Java 5  
compatible.  After looking at the code, I realized that only the name  
was necessary; once I made that change, I was able to remove that  
dependancy, and have the plug-in work in my eclipse.

- the plug-in is shipped with javac.jar and checkers.jar and need to  
be updated every time we made a release.  A user needs to update the  
plug-in along with the jars every-time.  I prefer using a global  
variable to find javac.jar and checkers.jar (or have a dialog  
somewhere to set them).

::Experience with working with the plug-in::
1. The plug-in tries to find checkers.jar through the classpath of the  
project.  I found that to be a bit annoying.
- When a project imports checkers.jar, it needs to import javac.jar  
too; because of checkers.jar dependancy on javac.jar.  I don't  
particularly like that.  The proper solution for this one is to  
distribute a jar with the qualifiers only to be used by eclipse  
projects.
- Also, when using eclipse, I prefer using the commented out  
annotations (e.g. /*@Interned*/) and using jsr308_imports flag.   
checkers.jar doesn't need to be in the path in that case.

2. The markers contain all lines instead of the first line.  The  
formating is disturbed, and I was getting messages like:
> dereference of possibly-null reference m m.toString(); ^ 1 error
to the side.

It might be OK to ignore the last two lines for each message and the  
last three lines for the last message (they simply print the tree with  
a pointer ^ to the error).  If they aren't properly printed, there is  
no point in having them.

::Random bugs::
- jarFile.getLocation() returns null when jar file is not part of the  
project.
I needed to replace the jarFile.getLocation() in  
JSR308Worker.getAbsolutePath() to jarFile.getFullPath() to avoid a  
null pointer exception.
- Using Eclipse 3.4

Regards,
Mahmood




More information about the checkers mailing list