Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 292926 - [modeling] ITA while validating w/ ValidatingEContentAdapter
Summary: [modeling] ITA while validating w/ ValidatingEContentAdapter
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Incubators (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Benjamin Cabé CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-21 12:49 EDT by Benjamin Cabé CLA
Modified: 2010-02-10 05:55 EST (History)
1 user (show)

See Also:


Attachments
Always perform MessageManager update within the UI Thread (1.70 KB, patch)
2010-02-10 05:29 EST, Sebastien Moran CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Cabé CLA 2009-10-21 12:49:13 EDT
!ENTRY org.eclipse.ui 4 4 2009-10-21 18:50:45.234
!MESSAGE Invalid thread access
!STACK 0
org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:3777)
	at org.eclipse.swt.SWT.error(SWT.java:3695)
	at org.eclipse.swt.SWT.error(SWT.java:3666)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355)
	at org.eclipse.swt.widgets.Control.getBounds(Control.java:1102)
	at org.eclipse.ui.internal.forms.MessageManager.update(MessageManager.java:443)
	at org.eclipse.ui.internal.forms.MessageManager.updateForm(MessageManager.java:438)
	at org.eclipse.ui.internal.forms.MessageManager.update(MessageManager.java:424)
	at org.eclipse.pde.emfforms.internal.validation.ValidatingEContentAdapter.validate(ValidatingEContentAdapter.java:95)
	at org.eclipse.pde.emfforms.internal.validation.ValidatingEContentAdapter.notifyChanged(ValidatingEContentAdapter.java:75)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:247)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eContainer(BasicEObjectImpl.java:779)
	at com.anwrt.m2m.model.impl.ComponentClassImpl.getProject(ComponentClassImpl.java:231)
	at com.anwrt.m2m.model.util.M2MValidator.validateMethod_NameUnique(M2MValidator.java:1301)
	at com.anwrt.m2m.model.util.M2MValidator.validateMethod(M2MValidator.java:1280)
	at com.anwrt.m2m.model.util.M2MValidator.validate(M2MValidator.java:158)
	at org.eclipse.emf.ecore.util.EObjectValidator.validate(EObjectValidator.java:171)
	at com.anwrt.m2m.validation.core.AdvancedM2MValidator.validate(AdvancedM2MValidator.java:66)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:164)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:114)
	at org.eclipse.pde.emfforms.internal.validation.EmfValidatorLabelDecorator.decorate(EmfValidatorLabelDecorator.java:44)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:72)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:356)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:338)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:374)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:334)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Sebastien Moran CLA 2010-02-10 05:28:44 EST
Herewith you'll find a patch which solves the problem by always performing the MessageManager update within the UI Thread.
Comment 2 Sebastien Moran CLA 2010-02-10 05:29:35 EST
Created attachment 158681 [details]
Always perform MessageManager update within the UI Thread
Comment 3 Benjamin Cabé CLA 2010-02-10 05:55:17 EST
available in HEAD > 20100210 ; thanks!