From e42b0ea6908ae346e12d1214ac38bd932821974c Mon Sep 17 00:00:00 2001 From: rsrinivasan Date: Thu, 21 Aug 2008 20:16:29 +0000 Subject: Temporary workaround for 23506 and 244486 on 3_0_1_patches stream. --- .../jst/jsf/facesconfig/ui/FacesConfigEditor.java | 10 ++++++-- .../jst/jsf/facesconfig/ui/page/OthersPage.java | 21 ++++++++++++--- .../editpart/PageflowElementTreeEditPart.java | 13 ++++++++-- .../pageflow/synchronization/PFBatchAdapter.java | 9 +++++-- .../ui/section/ComponentGeneralSection.java | 16 ++++++++++-- .../ui/section/ConverterGeneralSection.java | 16 ++++++++++-- .../ui/section/LocaleConfigSection.java | 11 +++++++- .../ui/section/ManagedBeanGeneralSection.java | 10 +++++++- .../ui/section/OverviewNavigationSection.java | 30 ++++++++++++++++++---- .../ui/section/OverviewOthersSection.java | 11 ++++++-- .../ui/section/RenderkitGeneralSection.java | 17 ++++++++++-- .../ui/section/ValidatorGeneralSection.java | 16 ++++++++++-- 12 files changed, 154 insertions(+), 26 deletions(-) diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/FacesConfigEditor.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/FacesConfigEditor.java index 35e8d685e..ed0513de0 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/FacesConfigEditor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/FacesConfigEditor.java @@ -641,9 +641,15 @@ public class FacesConfigEditor extends FormEditor implements * @see org.eclipse.ui.ISaveablePart#isDirty() */ public boolean isDirty() { - return ((BasicCommandStack) editingDomain.getCommandStack()) + final boolean[] result = new boolean[1]; + PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { + public void run() { + result[0] = ((BasicCommandStack) editingDomain.getCommandStack()) .isSaveNeeded() - || super.isDirty(); + || FacesConfigEditor.super.isDirty(); + } + }); + return result[0]; } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/page/OthersPage.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/page/OthersPage.java index b0026c941..641c7ceb0 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/page/OthersPage.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/page/OthersPage.java @@ -56,6 +56,7 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IActionBars; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.editor.FormPage; import org.eclipse.ui.forms.widgets.FormToolkit; @@ -443,17 +444,31 @@ public class OthersPage extends FormPage implements IFacesConfigPage, */ class FacesConfigOthersAdapter extends AdapterImpl { public void notifyChanged(Notification msg) { + if(getPartControl().isDisposed()) { + return; + } if (msg.getEventType() == Notification.REMOVE || msg.getEventType() == Notification.ADD) { if (msg.getFeature() == FacesConfigPackage.eINSTANCE .getFacesConfigType_Application()) { - resetApplicationInput(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + resetApplicationInput(); + } + }); } else if (msg.getFeature() == FacesConfigPackage.eINSTANCE .getFacesConfigType_Factory()) { - resetFactoryInput(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + resetFactoryInput(); + } + }); } else if (msg.getFeature() == FacesConfigPackage.eINSTANCE .getFacesConfigType_Lifecycle()) { - resetLifecycleInput(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + resetLifecycleInput(); } + }); } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/editpart/PageflowElementTreeEditPart.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/editpart/PageflowElementTreeEditPart.java index b6f50c76e..075cd244c 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/editpart/PageflowElementTreeEditPart.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/editpart/PageflowElementTreeEditPart.java @@ -22,6 +22,7 @@ import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowElement; import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowPage; import org.eclipse.jst.jsf.facesconfig.ui.pageflow.properties.PageflowElementPropertySource; import org.eclipse.swt.graphics.Image; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.views.properties.IPropertySource; /** @@ -173,11 +174,19 @@ public class PageflowElementTreeEditPart extends AbstractTreeEditPart implements case Notification.ADD_MANY: case Notification.REMOVE: case Notification.REMOVE_MANY: - refreshChildren(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refreshChildren(); + } + }); break; case Notification.SET: - refreshVisuals(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refreshVisuals(); + } + }); break; } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/synchronization/PFBatchAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/synchronization/PFBatchAdapter.java index 36c2acbeb..6efc897af 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/synchronization/PFBatchAdapter.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/synchronization/PFBatchAdapter.java @@ -14,6 +14,7 @@ package org.eclipse.jst.jsf.facesconfig.ui.pageflow.synchronization; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.impl.AdapterImpl; import org.eclipse.gef.editparts.AbstractGraphicalEditPart; +import org.eclipse.ui.PlatformUI; /** * @author hmeng @@ -41,9 +42,13 @@ public abstract class PFBatchAdapter extends AdapterImpl { this.needPostpone = needPostpone; } - final public void notifyChanged(Notification msg) { + final public void notifyChanged(final Notification msg) { if (!isNeedPostpone(msg)) { - doNotifyChanged(msg); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + doNotifyChanged(msg); + } + }); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentGeneralSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentGeneralSection.java index 9c0f27eb6..31971bf08 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentGeneralSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentGeneralSection.java @@ -39,6 +39,7 @@ import org.eclipse.jst.jsf.facesconfig.ui.util.ModelUtil; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; @@ -245,6 +246,9 @@ public class ComponentGeneralSection extends AbstractFacesConfigSection { * Refresh the content on this section. */ public void refresh() { + if(getSection() == null || getSection().isDisposed()) { + return; + } super.refresh(); Object input = this.getInput(); if (input instanceof ComponentType) { @@ -390,12 +394,20 @@ public class ComponentGeneralSection extends AbstractFacesConfigSection { .getComponentType_DisplayName() || msg.getFeature() == FacesConfigPackage.eINSTANCE .getComponentType_Description()) { - refresh(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refresh(); + } + }); } else if (msg.getFeature() == FacesConfigPackage.eINSTANCE .getDisplayNameType_TextContent() || msg.getFeature() == FacesConfigPackage.eINSTANCE .getDescriptionType_TextContent()) { - refresh(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refresh(); + } + }); } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ConverterGeneralSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ConverterGeneralSection.java index baf609737..5db889b47 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ConverterGeneralSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ConverterGeneralSection.java @@ -44,6 +44,7 @@ import org.eclipse.jst.jsf.facesconfig.ui.util.ModelUtil; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; @@ -303,6 +304,9 @@ public class ConverterGeneralSection extends AbstractFacesConfigSection { * */ public void refresh() { + if(getSection() == null || getSection().isDisposed()) { + return; + } super.refresh(); Object input = this.getInput(); if (input instanceof ConverterType) { @@ -459,12 +463,20 @@ public class ConverterGeneralSection extends AbstractFacesConfigSection { .getConverterType_Description() || msg.getFeature() == FacesConfigPackage.eINSTANCE .getConverterType_DisplayName()) { - refresh(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refresh(); + } + }); } else if (msg.getFeature() == FacesConfigPackage.eINSTANCE .getDisplayNameType_TextContent() || msg.getFeature() == FacesConfigPackage.eINSTANCE .getDescriptionType_TextContent()) { - refresh(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refresh(); + } + }); } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/LocaleConfigSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/LocaleConfigSection.java index 518364884..876947483 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/LocaleConfigSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/LocaleConfigSection.java @@ -43,6 +43,7 @@ import org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; @@ -370,7 +371,15 @@ public class LocaleConfigSection extends ApplicationSection implements * a was created or removed, notify this * section to reset it's input. */ - setInput(getInput()); + + if(getSection() == null || getSection().isDisposed()) { + return; + } + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + setInput(getInput()); + } + }); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ManagedBeanGeneralSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ManagedBeanGeneralSection.java index f65d6b991..68c8ad09c 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ManagedBeanGeneralSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ManagedBeanGeneralSection.java @@ -36,6 +36,7 @@ import org.eclipse.jst.jsf.facesconfig.ui.page.IFacesConfigPage; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; @@ -232,6 +233,9 @@ public class ManagedBeanGeneralSection extends AbstractFacesConfigSection { * */ public void refresh() { + if(getSection() == null || getSection().isDisposed()) { + return; + } super.refresh(); Object input = this.getInput(); if (input instanceof ManagedBeanType) { @@ -308,7 +312,11 @@ public class ManagedBeanGeneralSection extends AbstractFacesConfigSection { .getManagedBeanType_ManagedBeanClass() || msg.getFeature() == FacesConfigPackage.eINSTANCE .getManagedBeanType_ManagedBeanScope()) { - refresh(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refresh(); + } + }); } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/OverviewNavigationSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/OverviewNavigationSection.java index 973c4f0a4..b04de92d8 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/OverviewNavigationSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/OverviewNavigationSection.java @@ -40,6 +40,7 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; @@ -188,6 +189,9 @@ public class OverviewNavigationSection extends AbstractOverviewSection { * @see org.eclipse.jst.jsf.facesconfig.ui.section.IFacesConfigSection#refreshAll() */ public void refreshAll() { + if(getSection() == null || getSection().isDisposed()) { + return; + } List navigationCaseList = new ArrayList(); if (getInput() instanceof FacesConfigType) { List navigationRules = ((FacesConfigType) getInput()) @@ -333,7 +337,11 @@ public class OverviewNavigationSection extends AbstractOverviewSection { if (msg.getEventType() == Notification.ADD || msg.getEventType() == Notification.REMOVE || msg.getEventType() == Notification.SET) - refreshAll(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refreshAll(); + } + }); return; } @@ -354,9 +362,15 @@ public class OverviewNavigationSection extends AbstractOverviewSection { || msg.getEventType() == Notification.REMOVE || msg.getEventType() == Notification.SET) { - NavigationCaseType navigationCase = (NavigationCaseType) msg + final NavigationCaseType navigationCase = (NavigationCaseType) msg .getNotifier(); - tableViewer.refresh(navigationCase); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + if(!tableViewer.getControl().isDisposed()) { + tableViewer.refresh(navigationCase); + } + } + }); } return; } @@ -369,9 +383,15 @@ public class OverviewNavigationSection extends AbstractOverviewSection { if (msg.getEventType() == Notification.ADD || msg.getEventType() == Notification.REMOVE || msg.getEventType() == Notification.SET) { - NavigationCaseType navigationCase = (NavigationCaseType) ((EObject) msg + final NavigationCaseType navigationCase = (NavigationCaseType) ((EObject) msg .getNotifier()).eContainer(); - tableViewer.refresh(navigationCase); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + if(!tableViewer.getControl().isDisposed()) { + tableViewer.refresh(navigationCase); + } + } + }); } return; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/OverviewOthersSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/OverviewOthersSection.java index 573987f70..2cf904fb2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/OverviewOthersSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/OverviewOthersSection.java @@ -38,6 +38,7 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; @@ -131,7 +132,9 @@ public class OverviewOthersSection extends AbstractOverviewSection { * @see org.eclipse.jst.jsf.facesconfig.ui.section.AbstractOverviewSection#refreshAll() */ public void refreshAll() { - + if(getSection() == null || getSection().isDisposed()) { + return; + } List othersNodesList = new ArrayList(); if (getInput() instanceof FacesConfigType) { Object[] applicationNodes = null; @@ -341,7 +344,11 @@ public class OverviewOthersSection extends AbstractOverviewSection { if (msg.getEventType() == Notification.ADD || msg.getEventType() == Notification.REMOVE || msg.getEventType() == Notification.SET) { - refreshAll(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refreshAll(); + } + }); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/RenderkitGeneralSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/RenderkitGeneralSection.java index 399f547aa..2242f73ca 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/RenderkitGeneralSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/RenderkitGeneralSection.java @@ -39,6 +39,7 @@ import org.eclipse.jst.jsf.facesconfig.ui.util.ModelUtil; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; @@ -240,6 +241,9 @@ public class RenderkitGeneralSection extends AbstractFacesConfigSection { * */ public void refresh() { + if(getSection() == null || getSection().isDisposed()) { + return; + } super.refresh(); Object input = this.getInput(); if (input instanceof RenderKitType) { @@ -386,12 +390,21 @@ public class RenderkitGeneralSection extends AbstractFacesConfigSection { .getRenderKitType_Description() || msg.getFeature() == FacesConfigPackage.eINSTANCE .getRenderKitType_DisplayName()) { - refresh(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refresh(); + } + }); + } else if (msg.getFeature() == FacesConfigPackage.eINSTANCE .getDisplayNameType_TextContent() || msg.getFeature() == FacesConfigPackage.eINSTANCE .getDescriptionType_TextContent()) { - refresh(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refresh(); + } + }); } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ValidatorGeneralSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ValidatorGeneralSection.java index 649b7f77a..2a1001519 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ValidatorGeneralSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ValidatorGeneralSection.java @@ -39,6 +39,7 @@ import org.eclipse.jst.jsf.facesconfig.ui.util.ModelUtil; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; @@ -241,6 +242,9 @@ public class ValidatorGeneralSection extends AbstractFacesConfigSection { * */ public void refresh() { + if(getSection() == null || getSection().isDisposed()) { + return; + } super.refresh(); Object input = this.getInput(); if (input instanceof ValidatorType) { @@ -387,12 +391,20 @@ public class ValidatorGeneralSection extends AbstractFacesConfigSection { .getValidatorType_Description() || msg.getFeature() == FacesConfigPackage.eINSTANCE .getValidatorType_DisplayName()) { - refresh(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refresh(); + } + }); } else if (msg.getFeature() == FacesConfigPackage.eINSTANCE .getDisplayNameType_TextContent() || msg.getFeature() == FacesConfigPackage.eINSTANCE .getDescriptionType_TextContent()) { - refresh(); + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + refresh(); + } + }); } } } -- cgit v1.2.3