Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 78233 Details for
Bug 183176
RSE causing SWT "Widget is disposed" exceptions on platform shutdown
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to suppress "widget is disposed" during shutdown
patch183176_widgetDisposed.diff.txt (text/plain), 4.11 KB, created by
Martin Oberhuber
on 2007-09-12 17:03:21 EDT
(
hide
)
Description:
Patch to suppress "widget is disposed" during shutdown
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2007-09-12 17:03:21 EDT
Size:
4.11 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.ui >Index: UI/org/eclipse/rse/internal/ui/view/SystemView.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java,v >retrieving revision 1.150 >diff -u -r1.150 SystemView.java >--- UI/org/eclipse/rse/internal/ui/view/SystemView.java 9 Aug 2007 15:27:32 -0000 1.150 >+++ UI/org/eclipse/rse/internal/ui/view/SystemView.java 12 Sep 2007 21:01:10 -0000 >@@ -40,6 +40,7 @@ > * Kevin Doyle (IBM) - [198576] Renaming a folder directly under a Filter doesn't update children > * Kevin Doyle (IBM) - [196582] Deprecated getRemoteObjectIdentifier > * Martin Oberhuber (Wind River) - [198650] Fix assertion when restoring workbench state >+ * Martin Oberhuber (Wind River) - [183176] Fix "widget is disposed" during Platform shutdown > ********************************************************************************/ > > package org.eclipse.rse.internal.ui.view; >@@ -55,6 +56,7 @@ > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.Platform; > import org.eclipse.core.runtime.Status; > import org.eclipse.core.runtime.jobs.Job; > import org.eclipse.jface.action.ActionContributionItem; >@@ -1153,12 +1155,11 @@ > * Convenience method for returning the shell of this viewer. > */ > public Shell getShell() { >- ////getShell() can lead to "widget is disposed" errors, but avoiding them here does not really help >- //if (!getTree().isDisposed()) { >- // return getTree().getShell(); >- //} >- //return shell; >- return getTree().getShell(); >+ //getShell() can lead to "widget is disposed" errors, but avoiding them here does not really help >+ if (!getTree().isDisposed()) { >+ return getTree().getShell(); >+ } >+ return shell; > } > > /** >@@ -1620,22 +1621,38 @@ > * Called when something changes in the model > */ > public void systemResourceChanged(ISystemResourceChangeEvent event) { >- ResourceChangedJob job = new ResourceChangedJob(event, this); >- job.setPriority(Job.INTERACTIVE); >- //job.setUser(true); >- job.schedule(); >- /* >- Display display = Display.getCurrent(); >- try { >- while (job.getResult() == null) { >- while (display != null && display.readAndDispatch()) { >- //Process everything on event queue >+ if (!getControl().isDisposed()) { >+ ResourceChangedJob job = new ResourceChangedJob(event, this); >+ job.setPriority(Job.INTERACTIVE); >+ //job.setUser(true); >+ job.schedule(); >+ /* >+ Display display = Display.getCurrent(); >+ try { >+ while (job.getResult() == null) { >+ while (display != null && display.readAndDispatch()) { >+ //Process everything on event queue >+ } >+ if (job.getResult() == null) Thread.sleep(200); > } >- if (job.getResult() == null) Thread.sleep(200); >+ } catch (InterruptedException e) { >+ } >+ */ >+ } else { >+ trace("resource changed while shutting down"); //$NON-NLS-1$ >+ } >+ } >+ >+ public void trace(String str) { >+ String id = RSEUIPlugin.getDefault().getBundle().getSymbolicName(); >+ String val = Platform.getDebugOption(id + "/debug"); //$NON-NLS-1$ >+ if ("true".equals(val)) { //$NON-NLS-1$ >+ try { >+ throw new IllegalStateException(str); >+ } catch(IllegalStateException e) { >+ e.printStackTrace(); > } >- } catch (InterruptedException e) { > } >- */ > } > > /** >@@ -1657,6 +1674,10 @@ > } > > public IStatus runInUIThread(IProgressMonitor monitor) { >+ if (getControl().isDisposed()) { >+ trace("SystemView: refresh after disposed"); //$NON-NLS-1$ >+ return Status.CANCEL_STATUS; >+ } > int type = _event.getType(); > Object src = _event.getSource(); > Object parent = _event.getParent(); >Index: .options >=================================================================== >RCS file: .options >diff -N .options >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .options 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1 @@ >+org.eclipse.rse.ui/debug = true
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 183176
: 78233