}
public boolean displayNewDocumentWizard(XJDocument document) {
// only display for grammar (*.g) files
if (document != null && document instanceof GrammarDocument) {
NewWizardDialog dialog = new NewWizardDialog(document.getWindow().getJavaContainer());
if(dialog.runModal() == XJDialog.BUTTON_OK) {
((GrammarWindow)document.getWindow()).loadText(dialog.getGeneratedText());
return true;
}
}
return false;
}