- AbstractNewEntityWizard wizard = getNewEntityWizard(e.text);
-
- wizard.init(null, null);
- if(wizard.getEntity() != null) {
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- int status = dialog.open();
-
- if (status == IStatus.OK) {
-
- T entity = (T) wizard.getEntity();
- model.add(new UuidAndTitleCache<T>(entity.getUuid(),
- entity.getId(),
- getTitle(entity)));
- refresh();
- setPattern(entity);
- getConversationHolder().bind();
- }
- //FIXME : Need to make sure this is a stable fix (ticket 3822)
- getConversationHolder().commit();
- }
+ AbstractNewEntityWizard wizard = getNewEntityWizard(e.text);
+ if(wizard!=null){
+ wizard.init(null, null);
+ if(wizard.getEntity() != null) {
+ WizardDialog dialog = new WizardDialog(getShell(), wizard);
+ int status = dialog.open();
+
+ if (status == IStatus.OK) {
+
+ T entity = (T) wizard.getEntity();
+ // model.add(new UuidAndTitleCache<T>(entity.getUuid(), entity.getId(), getTitle(entity)));
+ refresh();
+ setPattern(entity);
+ if (getConversationHolder() != null){
+ getConversationHolder().bind();
+ }
+ }
+ //FIXME : Need to make sure this is a stable fix (ticket 3822)
+ if (getConversationHolder() != null){
+ getConversationHolder().commit();
+ }
+ }
+ }