Archive for category Research
Eclipse Plugin Tag Cloud
Posted by Steve in Eclipse Plugins, Tagging / Folksonomies on 12 August 2009
I got fed up looking for a nice version of an eclipse tag cloud so instead I made my own.
Its simple but effective.
You can download the archive here. Or look at the code below.
eclipseTagCloud.zip
All you should need to do to display it is make a viewpart and then write something like.
// pass the tag cloud generate a data structure like the following
// example code
ArrayList al = new ArrayList();
al.add(new Pair("tag 1", 3);
al.add(new Pair("tag 2", 6);
// create the tag cloud generator
EclipseTagCloudGenerator tclg = new EclipseTagCloudGenerator(al);
tclg.setMaxTags(35); //set max tags to display (by default will display most frequent)
tclg.setScale(2); //set scale to increase font by
tclg.generateTagCloudDisplay(comp, tclg.getTagCloud()); //generate the tag cloud and attach it to the parent comp object