Civet web
gaurav j's blog
Friday, September 6, 2013
Thursday, July 5, 2012
Your own shell
my combo is
- Zukitwo-Cupertino shell.
- Adwaita Cupertino theme.
- Mac-Snow-Leopard icons.
- maximus gnome-shell extension.
- system-monitor gnome-shell extension.
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.
Configure prism for standlone extensions as explained in "Haroon's Blog". The important points in the bolg are:-
- XUL file used by prism (webrunner.xul) & firefox (browser.xul) as entered in chrome.manifest file.
- You can shift the version in install.rdf to include your prism version.
- 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
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.