Eclipse – GMF – Making Figures Sensitive To Attributes Of Semantic Elements

TASK: Change a diagram editor generated by GMF to make its figures sensitive to changes of semantic elements’ attributes’ values. Changes of attributes’ values should be automatically detected and reflected in figures’ look. SOLUTION: You have to make a little change in *EditPart class. I’m going to change edit part for the semantic model element … Read more

Put Image Size Into Filename

Sometimes it is useful to have image size written in filename (I needed it when I was browsing my collection of wallpapers). I could not find any tool which would automate this process, so I have decided to write one. Probably it is job for bash or Python but I like Java most, so it … Read more

Eclipse GMF – Enabling UUIDs in Semantic model – The Simplest Way

This solution is for those who use also GMF. In one of your plug-ins (or create a new empty plug-in for that) add following section to plugin.xml: <extension point="org.eclipse.emf.ecore.extension_parser"> <parser type="MY_SEMANTIC_MODEL_FILE_EXTENSION" class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory"> </parser> </extension> It will make EMF use GMFResourceFactory for XMI [de]serialization. GMFResourceFactory enables usage of UUIDs. Don’t forget to replace MY_SEMANTIC_MODEL_FILE_EXTENSION with your … Read more

Problem with GWT-Ext in hosted mode on Linux

Currently I’m writing NetFlow analyser as a Rich Internet Application. After long consideration and evaluation of available open-source technologies I have concluded that GWT will be the best shot in this case (now I’m not so sure any more, but this is another story). To make building nice user interface easier I have decided to equip user side CLASSPATH with GWT-Ext library. GWT-Ext reuses ExtJS and ExtJS needs some underlying JavaScript framework. A lot of people use YUI as base for ExtJS, so automatically I have started to use it too. And this is where the first problems arose.

Read more

Java Generics: Instantiating Objects Of Type Parameter Without Passing Class Literal To Instance

Cause generics in Java 1.5 and 1.6 are implemented using erasure, in most cases you can not get class object for type parameter, which means that in your generic classes you can not instantiate objects of type parameters. For example, the following code will not compile:

class Foo<T> {
        T field;
        public void bar() {
                field = new T(); // error
        }
}
 

Read more

Java version of gstpw

I like Java much more (about 38 times more) than C/C++. So I have written Java version of gstpw. Java version of course has more features :) and needs less lines of code to implement them. Moreover I have provided possibility to start it: as standalone by $ java -jar jstpw.jat via WebStart: