Bug 178685 - FileModificationValidator can be called from any thread
Summary: FileModificationValidator can be called from any thread
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-21 18:20 EDT by John Arthorne CLA
Modified: 2007-04-17 14:08 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2007-03-21 18:20:45 EDT
Build: I200703201-1300

If the FileModificationValidator is called outside the UI thread, an invalid thread access occurs because the default validator in team UI is attempting to access UI controls. FileModificationValidator can be called from any thread, so the validator in team needs to accomodate this.

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:3499)
at org.eclipse.swt.SWT.error(SWT.java:3422)
at org.eclipse.swt.SWT.error(SWT.java:3393)
at org.eclipse.swt.widgets.Widget.error(Widget.java:432)
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:274)
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:265)
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:218)
at org.eclipse.team.internal.ui.Utils.getShell(Utils.java:252)
at
org.eclipse.team.internal.ui.DefaultUIFileModificationValidator.getShell(DefaultUIFileModificationValidator.java:156)
at
org.eclipse.team.internal.ui.DefaultUIFileModificationValidator.validateEdit(DefaultUIFileModificationValidator.java:127)
at
org.eclipse.team.internal.core.DefaultFileModificationValidator.validateEdit(DefaultFileModificationValidator.java:49)
at
org.eclipse.team.internal.core.FileModificationValidatorManager.validateEdit(FileModificationValidatorManager.java:67)
at
org.eclipse.core.resources.team.FileModificationValidator.validateEdit(FileModificationValidator.java:58)
at org.eclipse.core.internal.resources.Workspace$5.run(Workspace.java:2024)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.resources.Workspace.validateEdit(Workspace.java:2027)
Comment 1 Michael Valenta CLA 2007-03-27 12:03:42 EDT
Fixed
Comment 2 Konstantin Komissarchik CLA 2007-04-17 14:08:01 EDT
Verified in I20070410-1043 build. Thanks.