try {
manager.connect(editorInput);
ICompilationUnit workingCopy = manager.getWorkingCopy(editorInput);
CreateDialog dialog = new CreateDialog(new Shell(), new BuilderGenerator());
dialog.show(workingCopy);
synchronized (workingCopy) {
workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
}