Lines 40-45
Link Here
|
40 |
* Kevin Doyle (IBM) - [198576] Renaming a folder directly under a Filter doesn't update children |
40 |
* Kevin Doyle (IBM) - [198576] Renaming a folder directly under a Filter doesn't update children |
41 |
* Kevin Doyle (IBM) - [196582] Deprecated getRemoteObjectIdentifier |
41 |
* Kevin Doyle (IBM) - [196582] Deprecated getRemoteObjectIdentifier |
42 |
* Martin Oberhuber (Wind River) - [198650] Fix assertion when restoring workbench state |
42 |
* Martin Oberhuber (Wind River) - [198650] Fix assertion when restoring workbench state |
|
|
43 |
* Martin Oberhuber (Wind River) - [183176] Fix "widget is disposed" during Platform shutdown |
43 |
********************************************************************************/ |
44 |
********************************************************************************/ |
44 |
|
45 |
|
45 |
package org.eclipse.rse.internal.ui.view; |
46 |
package org.eclipse.rse.internal.ui.view; |
Lines 55-60
Link Here
|
55 |
import org.eclipse.core.runtime.IProgressMonitor; |
56 |
import org.eclipse.core.runtime.IProgressMonitor; |
56 |
import org.eclipse.core.runtime.IStatus; |
57 |
import org.eclipse.core.runtime.IStatus; |
57 |
import org.eclipse.core.runtime.NullProgressMonitor; |
58 |
import org.eclipse.core.runtime.NullProgressMonitor; |
|
|
59 |
import org.eclipse.core.runtime.Platform; |
58 |
import org.eclipse.core.runtime.Status; |
60 |
import org.eclipse.core.runtime.Status; |
59 |
import org.eclipse.core.runtime.jobs.Job; |
61 |
import org.eclipse.core.runtime.jobs.Job; |
60 |
import org.eclipse.jface.action.ActionContributionItem; |
62 |
import org.eclipse.jface.action.ActionContributionItem; |
Lines 1153-1164
Link Here
|
1153 |
* Convenience method for returning the shell of this viewer. |
1155 |
* Convenience method for returning the shell of this viewer. |
1154 |
*/ |
1156 |
*/ |
1155 |
public Shell getShell() { |
1157 |
public Shell getShell() { |
1156 |
////getShell() can lead to "widget is disposed" errors, but avoiding them here does not really help |
1158 |
//getShell() can lead to "widget is disposed" errors, but avoiding them here does not really help |
1157 |
//if (!getTree().isDisposed()) { |
1159 |
if (!getTree().isDisposed()) { |
1158 |
// return getTree().getShell(); |
1160 |
return getTree().getShell(); |
1159 |
//} |
1161 |
} |
1160 |
//return shell; |
1162 |
return shell; |
1161 |
return getTree().getShell(); |
|
|
1162 |
} |
1163 |
} |
1163 |
|
1164 |
|
1164 |
/** |
1165 |
/** |
Lines 1620-1641
Link Here
|
1620 |
* Called when something changes in the model |
1621 |
* Called when something changes in the model |
1621 |
*/ |
1622 |
*/ |
1622 |
public void systemResourceChanged(ISystemResourceChangeEvent event) { |
1623 |
public void systemResourceChanged(ISystemResourceChangeEvent event) { |
1623 |
ResourceChangedJob job = new ResourceChangedJob(event, this); |
1624 |
if (!getControl().isDisposed()) { |
1624 |
job.setPriority(Job.INTERACTIVE); |
1625 |
ResourceChangedJob job = new ResourceChangedJob(event, this); |
1625 |
//job.setUser(true); |
1626 |
job.setPriority(Job.INTERACTIVE); |
1626 |
job.schedule(); |
1627 |
//job.setUser(true); |
1627 |
/* |
1628 |
job.schedule(); |
1628 |
Display display = Display.getCurrent(); |
1629 |
/* |
1629 |
try { |
1630 |
Display display = Display.getCurrent(); |
1630 |
while (job.getResult() == null) { |
1631 |
try { |
1631 |
while (display != null && display.readAndDispatch()) { |
1632 |
while (job.getResult() == null) { |
1632 |
//Process everything on event queue |
1633 |
while (display != null && display.readAndDispatch()) { |
|
|
1634 |
//Process everything on event queue |
1635 |
} |
1636 |
if (job.getResult() == null) Thread.sleep(200); |
1633 |
} |
1637 |
} |
1634 |
if (job.getResult() == null) Thread.sleep(200); |
1638 |
} catch (InterruptedException e) { |
|
|
1639 |
} |
1640 |
*/ |
1641 |
} else { |
1642 |
trace("resource changed while shutting down"); //$NON-NLS-1$ |
1643 |
} |
1644 |
} |
1645 |
|
1646 |
public void trace(String str) { |
1647 |
String id = RSEUIPlugin.getDefault().getBundle().getSymbolicName(); |
1648 |
String val = Platform.getDebugOption(id + "/debug"); //$NON-NLS-1$ |
1649 |
if ("true".equals(val)) { //$NON-NLS-1$ |
1650 |
try { |
1651 |
throw new IllegalStateException(str); |
1652 |
} catch(IllegalStateException e) { |
1653 |
e.printStackTrace(); |
1635 |
} |
1654 |
} |
1636 |
} catch (InterruptedException e) { |
|
|
1637 |
} |
1655 |
} |
1638 |
*/ |
|
|
1639 |
} |
1656 |
} |
1640 |
|
1657 |
|
1641 |
/** |
1658 |
/** |
Lines 1657-1662
Link Here
|
1657 |
} |
1674 |
} |
1658 |
|
1675 |
|
1659 |
public IStatus runInUIThread(IProgressMonitor monitor) { |
1676 |
public IStatus runInUIThread(IProgressMonitor monitor) { |
|
|
1677 |
if (getControl().isDisposed()) { |
1678 |
trace("SystemView: refresh after disposed"); //$NON-NLS-1$ |
1679 |
return Status.CANCEL_STATUS; |
1680 |
} |
1660 |
int type = _event.getType(); |
1681 |
int type = _event.getType(); |
1661 |
Object src = _event.getSource(); |
1682 |
Object src = _event.getSource(); |
1662 |
Object parent = _event.getParent(); |
1683 |
Object parent = _event.getParent(); |