Object obj = ((IStructuredSelection) selection).getFirstElement();
// If we had a selection lets open the editor
if (obj != null) {
//ShapeModel geometry = (ShapeModel) obj;
NodeModel model = (NodeModel) obj;
ShapeGrammarInput input = new ShapeGrammarInput(model);
try {
// get Editor ID (it can be specific for different geometry)
String editorID = model.getEditorId();
// open editor