Evil wins when good people say nothingEdmund Burke
Tankut
August 28, 2009
February 23, 2009
Adding Listeners in EMF
In EMF, listeners are added like adapters. Lets say, you have a Person EObject with Name EAttribute. Here is a code snippet that will listen to changes in Name:
Person person = ExamplePackage.eINSTANCE.createPerson();
person.eAdapters().add(
new AdapterImpl() {
@Override
public void notifyChanged(Notification notification) {
// Listen for changes to features.
switch (notification.getFeatureID(Person.class)) {
case ExamplePackage.PERSON__NAME:
if(notification.getEventType() == Notification.SET) {
// do something
}
}
}
}
);
February 15, 2009
New Design for My Blog
I wanted to have simple and a wider template. And because I don't want to spend much time on this, I tried to find a template from web and change it a bit. Well, most templates are either very crowded or looking like first homework assignment of a html class. Finally, after me and Albina spending sometime at ourblogtemplates.com, we came up with "Computer Logo" template. I replaced the header image with a photo of mine taken in a hiking trip at Kastamonu, Turkey. Also I make it a little wider. A final touch was to make main text font color as black to increase its readaiblity.
I removed some gadgets from the blog and put "Recent Posts" and "Latest Comments" at the end. I hopefull those will be useful. I also remanaged labels so that they will be more useful.
Hope you like it,
Tankut