protected final GenerateDomElementProvider myProvider;
public GenerateDomElementAction(final GenerateDomElementProvider generateProvider) {
super(new CodeInsightActionHandler() {
public void invoke(final Project project, final Editor editor, final PsiFile file) {
new WriteCommandAction(project, file) {
protected void run(final Result result) throws Throwable {
final DomElement element = generateProvider.generate(project, editor, file);
generateProvider.navigate(element);
}
}.execute();