As you want to draw inside the editor, you don't need to create new Shell nor dispatch events from the event queue as you would do in a standalone SWT application; just create a Canvas and draw into it. This should help you:
public void createPartControl(Composite parent) {
Canvas canvas = new Canvas(parent, SWT.NONE);
LightweightSystem lws = new LightweightSystem(canvas);
IFigure panel = new Figure();
lws.setContents(panel);
[...]
panel.add(node1);
panel.add(node2);
panel.add(conn);
}