Posts Tagged ‘plugin’

Updating the java compare plugin

Thursday, August 23rd, 2007

I received some comments about my java compare plugin about my plugin ignoring preferences for text font and formatter settings. I didn’t address those at the beginning because I didn’t notice so as soon as I realized that was missing I put my hands at work.

The java formatter settings was easy just modifying the old

final Properties options = new Properties();
final CodeFormatter codeFormatter = ToolFactory	.createCodeFormatter(options);

with

final Map options = JavaCore.getOptions();
final CodeFormatter codeFormatter = ToolFactory.createCodeFormatter(options);

That’s easy. The font issue was also easy, just adding the following snippet to the plugin.xml did the trick:

   <extension
         point="org.eclipse.ui.themes">
      <fontDefinition
            categoryId="org.eclipse.compare.contentmergeviewer.TextMergeViewer"
            defaultsTo="org.eclipse.jdt.internal.ui.compare.JavaMergeViewer"
            id="com.rubenlaguna.eclipse.javacompare.JavaFormattingMergeViewer"
            label="Java compare text font (ignore formatting changes)">
         <description>
            The Java compare text font is used by Java compare/merge tools when the ignore formatting changes plugin is loaded.
         </description>
      </fontDefinition>     
   </extension>

Because JavaFormattingMergeViewer extends JavaMergeViewer whick in turns extends TextMergeViewer the code to manager fonts, etc is already in place it’s just a matter of setting it properly in the plugin.xml.

How to install trac 0.10.4 and XmlRpcPlugin on a non-standard directory location

Friday, August 17th, 2007

First you need setuptools/EasyInstall:

cd $HOME/opt
wget http://peak.telecommunity.com/dist/ez_setup.py
mkdir -p $HOME/opt/easyinstall/lib/python2.4/site-packages
PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages python ez_setup.py --prefix=$HOME/opt/easyinstall

Next, trac:

cd $HOME/opt
wget http://ftp.edgewall.com/pub/trac/trac-0.10.4.tar.gz
tar xvzf trac-0.10.4.tar.gz
cd trac-0.10.4
python setup.py install --prefix=$HOME/opt/trac
cd ..
rm -rf trac-0.10.4
cd trac
PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages/:$HOME/opt/trac/lib/python2.4/site-packages/  bin/trac-admin $HOME/testtracenv initenv

Then the xmlrpcplugin:

cd $HOME/opt
wget -O xmlrpcplugin.zip  'http://trac-hacks.org/changeset/latest/xmlrpcplugin?old_path=/&filename=xmlrpcplugin&format=zip'
unzip xmlrpcplugin.zip
cd xmlrpcplugin/0.10/
PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages/ python setup.py bdist_egg
cp dist/*.egg $HOME/testtracenv/plugins
cat <<EOF >>$HOME/testtracenv/conf/trac
.ini
> [components]
> tracrpc.* = enabled
> EOF

And now you can test your installation:

cd $HOME/opt/trac
PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages/:$HOME/opt/trac/lib/python2.4/site-packages/  bin/tracd -p 8080 $HOME/testtracenv

And point your browswer to http://localhost:8080/testtracenv/xmlrpc if it returns a Forbidden: XML_RPC privileges are required to perform this operation then the installation is complete.

forbidden.png

You start using XML_RPC only need to do assign permissions for users using trac-admin, to enable xml_rpc for the anonymous user type this:

PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages/:$HOME/opt/trac/lib/python2.4/site-packages/  bin/trac-admin $HOME/testtracenv permission add anonymous XML_RPC

Hope this helps

Useful WordPress plugin - Redirector

Monday, March 19th, 2007

Very useful WordPress plugin to redirect with a “301 moved permanently” from one of your post to any url. I created a Wordpress page out of a post and I wanted to redirect everybody from the post to the the page. My first solution was to include a link to the page in the post but doing an automatic redirect is better as it allows to move the google pagerank from the post’s URL to the page URL

Source code for Statistical Visualizer plugin for Apache Jmeter 2.2

Wednesday, January 17th, 2007

I just released the source code for the other Apache Jmeter plugin that I host here. Just go to the end of this page to download the file and get instructions.

Source code for enhanced jdbc sampler released

Wednesday, January 17th, 2007

I released the Enhanced JDBC Sampler for Apache JMeter 2.2 source code today. See the bottom of this page to find the downloadable zip and instructions.

Better JMeter Graphs

Tuesday, December 12th, 2006

I’ve moved this post to the following location

**UPDATE**: The files here will only run in JRE 1.6. I will try to provide JRE 1.5-compatible files as soon as possible. Thanks to Daniel for pointing this out.

If you are tired of the old “Graph Results” listener that JMeter provides

Old Graph Results

Click on the above image or here to see an enlarged version

Checkout this new JMeter plugin that provides a new Statistical Aggregate Report

Statistical Aggregate Report

Click on the above image or here to see an enlarged version

Installation

To install the plugin you only have to unzip the zipfile into the JMeter 2.2.1 installation dir. The zip file has four files, three of them go into the $JMETER_HOME/lib directory and the other file goes into the $JMETER_HOME/lib/ext directory.

Once is installed, restart JMeter and now you must see a new “Statistical Aggregate Report” in the Add -> Listener menu.

This plugin it’s mainly the work of Lars Krogjensen (he provided most of the code) I only modified it a bit and repackaged it. I’ll post the source code as soon as I can.

Hope you find it useful

Google Sitemap Generator for WordPress v2 Final

Friday, August 25th, 2006

If you host your wordpress blog and want to make it more searchable from google this wordpress plugin Google Sitemap Generator for WordPress v2 Final creates sitemaps automatically. Works for WP 2.0.4.

Useful resources to Eclipse Plugin Development

Thursday, August 24th, 2006

If you are new to Eclipse Plugin Developement like me, you must now that in the Eclipsepedia you can find very useful code snippets like “How to write to the eclipse console view from a plugin“. The best way to find information there is to use google query like “site:wiki.eclipse.org console write“.