[Soot-list] Eclipse ColorTags Disappearing

Jack Griffith jg205 at doc.ic.ac.uk
Wed Dec 17 11:50:56 EST 2008


Hi Eric,

Thanks very much for looking at this again! That's really well spotted, 
I never would have noticed that. This will help me loads, thanks so much!

Jack

Eric Bodden wrote:
> Jack, I had another look at this yesterday.
>
> It seems like the culprit is the AnnotationPainter in Eclipse. Here's
> what's happening:
>
> You analyze your code with the Soot plugin. The plugin then adds its
> color annotations to the text widget that holds the analyzed program
> text. This process notifies the eclipse JDT framework that the content
> of that widget was changed. This in turn then causes the widget to get
> "reconciled", which triggers the AnnotationPainter to (re)paint its
> warning annotations for the code in that widget. (This basically
> generates the yellow squiggles for warnings.) When this happens, the
> AnnotationPainter replaces any formatting that the Soot plugin may
> have introduced, basically trampling over everything that the Soot
> plugin may have done, but ONLY for lines that actually contain a
> warning.
>
> The proper solution should be to rework the Soot plugin so that it
> implements a LineStyleListener. When this is done, then the listener
> can effectively customize how warnings are painted, and avoid the
> "yellow squiggles trampling over the color annotations".
>
> In the meantime, I believe for you project you should simply get away
> with disabling all of Eclipse's warnings. Then the color tags should
> show up just fine.
>
> Eric
>
> 2008/12/14 Jack Griffith <jg205 at doc.ic.ac.uk>:
>   
>> Hi Eric,
>>
>> I am working on my final year project for my masters degree, and being able
>> to visualise the results of my analysis through colours would be extremely
>> valuable for me. I appreciate that you may have more urgent matters, but I
>> would really value any time spent towards fixing this in the near future!
>>
>> I find it odd that this would work a week or two ago, and on the (presumably
>> same as I am using the same versions) software there is now an issue?
>>
>> Thanks once again,
>> Jack
>>
>> -----Original Message-----
>> From: eric.bodden at googlemail.com [mailto:eric.bodden at googlemail.com] On
>> Behalf Of Eric Bodden
>> Sent: 14 December 2008 22:50
>> To: Jack Griffith
>> Cc: soot-list at sable.mcgill.ca
>> Subject: Re: [Soot-list] Eclipse ColorTags Disappearing
>>
>> Hi Jack.
>>
>> So far all I can tell you is that I can reproduce the problem. When
>> you (de)select a tag kind on the Analysis tab then the color tags are
>> quickly shown again, but not for long. The weirdest thing is that the
>> color tag for "World" is shown in green for me all the time. But all
>> the other tags seem to disappear again instantaneously.
>>
>> The Soot plugin is unfortunately of very bad code quality and it would
>> take me some time to debug this. Does this bug hold you back from
>> anything important? If not I would like to ask you to open a bug
>> report in our bugzilla so that we can look into it at some later
>> point.
>>
>> Eric
>>
>> 2008/12/14 Jack Griffith <jg205 at doc.ic.ac.uk>:
>>     
>>> Hi,
>>>
>>> I am experimenting with ColorTags in Eclipse, and I seem to have
>>> encountered a problem. The tags appear correctly for a brief second,
>>> then almost all of them disappear!
>>>
>>> I thought this was a problem with my implementation of tagging, but I
>>> now seem to have the same problem with the built-in NullPointerColourer
>>> as well, whereas I did not last week! I have made a fresh installation
>>> of eclipse and soot since my last test, perhaps this has had some
>>> influence on the outcome?
>>>
>>> For instance, the only ColorTags that persist in the test program below
>>> (when running the built-in NullPointerColorer) are:
>>>        1. BLUE tag on String[] args (indicating nullness unknown)
>>>        2. GREEN tag on "World" (indicating not null)
>>>
>>> public class Test
>>> {
>>>    public static void main(String[] args)
>>>    {
>>>        String str1 = null;
>>>        String str2 = "Hello";
>>>
>>>        String str3 = null;
>>>        String str4 = "World";
>>>    }
>>> }
>>>
>>> The Soot analysis I run is:
>>>
>>> soot.Main --f J --p jap.npcolorer enabled:true --polyglot
>>> --d .../Project/workspace/SimpleBodyTransformer/sootOutput --cp ...
>>> --keep-line-number --xml-attributes --src-prec java Test
>>>
>>> I think the crucial point is that all ColorTag's appear correctly very
>>> briefly, then disappear!
>>>
>>> I would really appreciate any insights on this problem.
>>>
>>> Thanks
>>> Jack
>>>
>>> _______________________________________________
>>> Soot-list mailing list
>>> Soot-list at sable.mcgill.ca
>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>>
>>>       
>>
>> --
>> Eric Bodden
>> Sable Research Group, McGill University
>> Montréal, Québec, Canada
>>
>>
>>     
>
>
>
>   



More information about the Soot-list mailing list