Ruben Laguna's blog

Aug 31, 2007 - 1 minute read - Comments - bug compare contentMergeViewer eclipse enhancement java page preference preferencepage

Eclipse #201116 contentMergeViewers discarded

I filled Bug 201116 – Compare will silently discard additional contentMergeViewers associated with the same file extension a couple of days ago. As Szymon Brandys says eclipse should allow the user to switch between the differente merge viewer available for a given extension. He proposes two solutions: 1) Having a mechanishm inside the compare view to do the switch 2) or having a preference page to do the same I feel more inclined towards the second solution, as I’m used to change the defautl editor for .

Aug 27, 2007 - 1 minute read - Comments - photos

Stockholm photos

My friend Manuel Couceiro have posted some photos of our holidays at Stockholm, Sweden.

Aug 23, 2007 - 1 minute read - Comments - eclipse font fontdefinition formatter java plugin

Updating the java compare plugin

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

Aug 19, 2007 - 1 minute read - Comments - avahi avahi-daemon dns domain linux local opendns troubleshooting

avahi and .local domain troubleshooting

I got the “avahi-daemon disabled because there is a unicast .local domain” but I have no .local domain so I was a little bit confused. ~$ sudo /etc/init.d/avahi-daemon restart * Restarting Avahi mDNS/DNS-SD Daemon: avahi-daemon * avahi-daemon disabled because there is a unicast .local domain After a while I realized that my ISP is playing tricks with the DNS. It will never return a “DNS lookup failed”, it always resolve any dns name you pass to it.

Aug 18, 2007 - 2 minute read - Comments - code comments compare decided eclipse formatting ignore java revisions whitespace

Eclipse Compare. Ignoring java formatting changes not only whitespace.

I met some difficulties dealing with the default eclipse java compare. I got involved on a project where everybody likes to commit code to CVS formatted their way, so comparing between CVS revisions is almost impossible. So I decided to start investigating about Eclipse plugin development to make a Java Compare Viewer that not only ignores whitespace but also all java formatting changes. The result is the following *Before *ignore java formatting plugin:

Aug 17, 2007 - 1 minute read - Comments - easyinstall howto installation linux plugin python rpc setuptools trac xml xmlrpc xml_rpc

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

First you need setuptools/EasyInstall: cd $HOME/opt wget mkdir -p $HOME/opt/easyinstall/lib/python2.4/site-packages PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages python --prefix=$HOME/opt/easyinstall Next, trac: cd $HOME/opt wget tar xvzf trac-0.10.4.tar.gz cd trac-0.10.4 python 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 '' unzip cd xmlrpcplugin/0.10/ PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages/ python bdist_egg cp dist/*.egg $HOME/testtracenv/plugins cat <<EOF >>$HOME/testtracenv/conf/trac .ini > [components] > tracrpc.

Jul 25, 2007 - 1 minute read - Comments - details eclipse error errordialog exception java reporting stacktrace

Eclipse Error Reporting: Exception stacktrace details

I’m working with Eclipse 3.2.2 RCP right now and I’m getting an exception that I want to display on screen. I found in the eclipsepedia that we must use ErrorDialog to report errors: try { // ... } catch (InvocationTargetException e) { IStatus status = new Status(IStatus.ERROR, Application.ID, 1, "Exception found.", e.getCause()); ErrorDialog.openError(window.getShell(),"Error while loading file", null,status); } But using this code snippet will only print the e.getLocalizedMessage() in the Details pane of the ErrorDialog.

Jul 5, 2007 - 1 minute read - Comments - bug domexception java namespace namespace_err saaj saaj0511

Java bug producing SAAJ0511 error

I run onto the following exception a couple of days ago: Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. at ( the following log trace was also present in the log file SEVERE: SAAJ0511: Unable to create envelope from given source Apparently I run onto a known java bug present in jdk1.

Jul 5, 2007 - 1 minute read - Comments - avi avi_files files linux normalize rename script shows srt_files tv

Scripts to rename avi files from TV Shows

If you got a lot of ill-named files like: $ ls S01E03.The.Sopranos.S01E03.Denial.Anger.Acceptance.avi The.Sopranos.1x04.Meadowlands.avi The.Sopranos.S01E01.The.Sopranos.avi The.Sopranos.S01E02.46.Long.avi The.Sopranos.S01E06.Pax.Soprana.avi The_Sopranos.105.College.avi that your divx player can’t sort properly and you want to end up with something like: $ ls 1x01.avi 1x02.avi 1x03.avi 1x04.avi 1x05.avi 1x06.avi you can use the following script in this way: cd /path/to/avi/files ../|sh and if you want to do the same thing to srt files then: cd /path/to/srt/files .

Jul 4, 2007 - 3 minute read - Comments - cost españa euro money parity power ppp purchasing purchasing-power-parity spain suecia sweden Uncategorized

Cost of life in different countries

I’m moving to Sweden soon and a friend of mine sent me the following link (in Spanish, sorry) about the salaries in different countries. From here, I learnt about Purchasing Power Parity and using the data from the IMF I obtained the PPP ratios from Spain, Sweden and other countries. Using this list you can translate how much worth is your money in other country. For example, roughly we can say that goods you buy in Sweden using 10000€ can be purchased in Spain for only 8058€.