This is example code based on the StateMachine example which is shipped as part of Xtext.
This example shows how an Eclipse MultiPageEditorPart
to facilitate both Xtext DSL text editing as well as GUI model editing can be realized in the same editor.
For a more detailed description see my Blog Article.