Skip to content

Commit 2904268

Browse files
committed
Drop dead log(Exception) helper in WorkbenchActivitySupport
The private log(Exception) method built an IStatus and discarded it, never actually logging anything. It has been broken since it was introduced in 2004. The only caller swallows InvocationTargetException and InterruptedException from ProgressMonitorDialog.run(); inline that swallow with a comment explaining why the interrupt flag is not re-set (ModalContext.run uses InterruptedException to signal cancellation, not actual thread interruption). Fixes #3915
1 parent b2f2d9b commit 2904268

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/activities/ws/WorkbenchActivitySupport.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.eclipse.core.runtime.IExtensionPoint;
2222
import org.eclipse.core.runtime.IProduct;
2323
import org.eclipse.core.runtime.IProgressMonitor;
24-
import org.eclipse.core.runtime.IStatus;
2524
import org.eclipse.core.runtime.Platform;
2625
import org.eclipse.core.runtime.dynamichelpers.ExtensionTracker;
2726
import org.eclipse.core.runtime.dynamichelpers.IExtensionChangeHandler;
@@ -55,7 +54,6 @@
5554
import org.eclipse.ui.internal.WorkbenchWindow;
5655
import org.eclipse.ui.internal.activities.MutableActivityManager;
5756
import org.eclipse.ui.internal.activities.ProxyActivityManager;
58-
import org.eclipse.ui.internal.misc.StatusUtil;
5957
import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
6058

6159
/**
@@ -229,22 +227,15 @@ private void updateManager(final IContributionManager manager) {
229227
try {
230228
dialog.run(false, false, runnable);
231229
} catch (InvocationTargetException | InterruptedException e2) {
232-
log(e2);
230+
// ModalContext.run uses InterruptedException to signal
231+
// cancellation rather than actual thread interruption, so
232+
// we do not re-set the interrupt flag here.
233233
}
234234
}));
235235
}
236236
}
237237
}
238238
}
239-
240-
/**
241-
* Logs an error message to the workbench log.
242-
*
243-
* @param e the exception to log
244-
*/
245-
private void log(Exception e) {
246-
StatusUtil.newStatus(IStatus.ERROR, "Could not update contribution managers", e); //$NON-NLS-1$
247-
}
248239
});
249240
}
250241

0 commit comments

Comments
 (0)