|
Lines 18-28
Link Here
|
| 18 |
import org.eclipse.core.runtime.ISafeRunnable; |
18 |
import org.eclipse.core.runtime.ISafeRunnable; |
| 19 |
import org.eclipse.core.runtime.IStatus; |
19 |
import org.eclipse.core.runtime.IStatus; |
| 20 |
import org.eclipse.core.runtime.SafeRunner; |
20 |
import org.eclipse.core.runtime.SafeRunner; |
|
|
21 |
import org.eclipse.core.runtime.Status; |
| 21 |
import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker; |
22 |
import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker; |
|
|
23 |
import org.eclipse.osgi.util.NLS; |
| 24 |
import org.eclipse.ui.PlatformUI; |
| 22 |
import org.eclipse.ui.internal.ObjectContributorManager; |
25 |
import org.eclipse.ui.internal.ObjectContributorManager; |
| 23 |
import org.eclipse.ui.internal.WorkbenchPlugin; |
26 |
import org.eclipse.ui.internal.WorkbenchMessages; |
| 24 |
import org.eclipse.ui.internal.misc.StatusUtil; |
|
|
| 25 |
import org.eclipse.ui.internal.util.Util; |
27 |
import org.eclipse.ui.internal.util.Util; |
|
|
28 |
import org.eclipse.ui.statushandlers.StatusManager; |
| 26 |
|
29 |
|
| 27 |
/** |
30 |
/** |
| 28 |
* The LightweightDecoratorManager is a decorator manager that encapsulates the |
31 |
* The LightweightDecoratorManager is a decorator manager that encapsulates the |
|
Lines 56-64
Link Here
|
| 56 |
* @see ISafeRunnable.handleException(Throwable). |
59 |
* @see ISafeRunnable.handleException(Throwable). |
| 57 |
*/ |
60 |
*/ |
| 58 |
public void handleException(Throwable exception) { |
61 |
public void handleException(Throwable exception) { |
| 59 |
IStatus status = StatusUtil.newStatus(IStatus.ERROR, exception |
62 |
String message = WorkbenchMessages.DecoratorError; |
| 60 |
.getMessage(), exception); |
63 |
if (decorator != null) { |
| 61 |
WorkbenchPlugin.log("Exception in Decorator", status); //$NON-NLS-1$ |
64 |
message += " " + NLS.bind(WorkbenchMessages.DecoratorWillBeDisabled, //$NON-NLS-1$ |
|
|
65 |
decorator.getName()); |
| 66 |
} |
| 67 |
StatusManager.getManager().handle( |
| 68 |
new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, message, |
| 69 |
exception), StatusManager.LOG | StatusManager.SHOW); |
| 62 |
if (decorator != null) { |
70 |
if (decorator != null) { |
| 63 |
decorator.crashDisable(); |
71 |
decorator.crashDisable(); |
| 64 |
} |
72 |
} |