Friday, September 6, 2013

riyadh

sometimes I miss riyadh. all dry as clouds pass by.

Thursday, July 5, 2012

Your own shell

the customization in gnome shell is limited. but with the right combination of themes & applications, it can be quite good & productive.
my combo is
  1. Zukitwo-Cupertino shell.
  2. Adwaita Cupertino theme.
  3. Mac-Snow-Leopard icons.
  4. maximus gnome-shell extension.
  5. system-monitor gnome-shell extension.
And here i have my very own shell.

Friday, September 16, 2011

Scribefire next 1.9 & Prism

I guess it is better to use prism for certain extension's like ScribeFire. Gnome lack's a class quality application for blogging. Lot of stuff is avilable online but is older and sometime dosen't works for extensions. The other method is to install the prism ( sudo apt-get install prism ) and check for URL in firefox "convert to website option".  I got the prism extension for firefox while I did sudo apt-get for prism. If you don't have the prism extension for firefox install it. Same way install the desired extension say Scribefire. Some way bring the extension to tab or window (click Scribefire Options button on bottom left) and click "Convert Website to Application...". Copy the URL from pop-up window and cancel the window.

Scribe fire next 1.9 in fire fox tabConfigure prism for standlone extensions as explained in "Haroon's Blog". The important points in the bolg are:-

  1. XUL file used by prism (webrunner.xul) & firefox (browser.xul) as entered in chrome.manifest file.
  2. You can shift the version in install.rdf to include your prism version.
  3. The .xul URL may not work as the XUL file may not be there. In scribe fire next 1.9 we have "chrome://scribefire-next/content/scribefire.html", a html file.

For application menu entry copy the "command" from prism shortcut file(.desktop file prism placed on your desktop). You can right click and go to properties or open the .desktop file in text editor.

We can remove minor mis alignment's & visual glitches by tweaking the css files in the extension, particularly in chrome/content/skin directory.

Wednesday, August 27, 2008

Software Designing - Code Generation

We design software using UML. The tools used will most likely generate the .uml file. If you are using open source tools like eclipse, you can generate the code from this .uml file. This is because this .uml file is an xml file which follows the standard

The information for this is best available in Acceleo site at http://www.acceleo.org/pages/home/en. The code generation is usually done by chaining the script and the model(.uml) file. There are lot of scripts available for code generation under modules section. The beginners can start by downloading the eclipse bundle eclipse-ganymede-win32-modeling-topcased-acceleo-.zip.

A typical script file looks like

<% metamodel http://www.eclipse.org/uml2/2.1.0/UML %>
<%script type="uml.Model" name="model" file="/config/<%name%>-config.xml"%>
<%recursion%>
>%script type="Element" name="recursion" post="trim()"%<
>%for ( descendant() ){%<>%if ( eClass.name == "Class" ){%<>%classes%<>%}%<>%}%<
>%script type="uml.Class" name="classes"%<
>%if ( name.endsWith("ServiceImpl") ){%<
>%}else if( name.endsWith("DaoHibernate") ){%<

>%}else if( name.endsWith("Controller") ){%<
>%if (superClass.nGet(0).name.endsWith("FormController")){%<
>%for ( ownedOperation.ownedParameter ){%<
>%if ( type.name.endsWith("Command") ){%<
>%}%<
>%}%<
>%}%<
>%}%<
>%if (name.endsWith("ServiceImpl") || name.endsWith("DaoHibernate") || name.endsWith("Controller") ){%<
>%for (ownedAttribute){%<
>%if ( name.endsWith("Dao") || name.endsWith("Service") ){%<

>%}%<
>%}%<
>%}%<
>%script type="Element" name="packagePath" post="trim()"%<
>%ancestor.select("eClass.name != 'Model'").reverse.name.replaceAll("\.",args(0)).sep(args(0))%<

This script parses the model chained to it. When it encounters type="uml.Model" it will execute script named model. The model script end when it encounters another script tag which is script named "recursion". The model script also gives a call to to the script recursion by "<%recursion%>".
The recursion script executes for all the elements in model due to for loop "<%for ( descendant() ){%>". If this loop encounters the class element in UML (eClass.name == "Class"). It gives the call to classes script.
The class script checks certain properties and generates the spring config file.