Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 107753 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/decorators/FullDecoratorRunnable.java (-6 / +13 lines)
Lines 12-19 Link Here
12
12
13
import org.eclipse.core.runtime.ISafeRunnable;
13
import org.eclipse.core.runtime.ISafeRunnable;
14
import org.eclipse.core.runtime.IStatus;
14
import org.eclipse.core.runtime.IStatus;
15
import org.eclipse.ui.internal.WorkbenchPlugin;
15
import org.eclipse.core.runtime.Status;
16
import org.eclipse.ui.internal.misc.StatusUtil;
16
import org.eclipse.osgi.util.NLS;
17
import org.eclipse.ui.PlatformUI;
18
import org.eclipse.ui.internal.WorkbenchMessages;
19
import org.eclipse.ui.statushandlers.StatusManager;
17
20
18
/**
21
/**
19
 * The FullDecoratorRunnable is the ISafeRunnable that runs
22
 * The FullDecoratorRunnable is the ISafeRunnable that runs
Lines 39-48 Link Here
39
     * @see ISafeRunnable.handleException(Throwable).
42
     * @see ISafeRunnable.handleException(Throwable).
40
     */
43
     */
41
    public void handleException(Throwable exception) {
44
    public void handleException(Throwable exception) {
42
        IStatus status = StatusUtil.newStatus(IStatus.ERROR, exception
45
		String message = WorkbenchMessages.DecoratorError
43
                .getMessage(), exception);
46
				+ " " //$NON-NLS-1$
44
        WorkbenchPlugin.log("Exception in Decorator", status); //$NON-NLS-1$
47
				+ NLS.bind(WorkbenchMessages.DecoratorWillBeDisabled, decorator
45
        decorator.crashDisable();
48
						.getName());
49
		StatusManager.getManager().handle(
50
				new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, message,
51
						exception), StatusManager.LOG | StatusManager.SHOW);
52
		decorator.crashDisable();
46
    }
53
    }
47
54
48
}
55
}
(-)Eclipse UI/org/eclipse/ui/internal/decorators/LightweightDecoratorManager.java (-5 / +13 lines)
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
			}
(-)Eclipse UI/org/eclipse/ui/internal/messages.properties (+2 lines)
Lines 467-472 Link Here
467
DecoratorsPreferencePage_description = Descriptio&n:
467
DecoratorsPreferencePage_description = Descriptio&n:
468
DecoratorsPreferencePage_decoratorsLabel = Available &label decorations:
468
DecoratorsPreferencePage_decoratorsLabel = Available &label decorations:
469
DecoratorsPreferencePage_explanation = Label decorations show extra information about an item on its label or icon.\nSelect which additional decorations should be displayed.
469
DecoratorsPreferencePage_explanation = Label decorations show extra information about an item on its label or icon.\nSelect which additional decorations should be displayed.
470
DecoratorError = Exception in Decorator.
471
DecoratorWillBeDisabled = The ''{0}'' decorator will be disabled.
470
472
471
# --- Startup preferences ---
473
# --- Startup preferences ---
472
StartupPreferencePage_label=&Plug-ins activated on startup:
474
StartupPreferencePage_label=&Plug-ins activated on startup:
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java (+2 lines)
Lines 501-506 Link Here
501
	public static String DecoratorsPreferencePage_description;
501
	public static String DecoratorsPreferencePage_description;
502
	public static String DecoratorsPreferencePage_decoratorsLabel;
502
	public static String DecoratorsPreferencePage_decoratorsLabel;
503
	public static String DecoratorsPreferencePage_explanation;
503
	public static String DecoratorsPreferencePage_explanation;
504
	public static String DecoratorError;
505
	public static String DecoratorWillBeDisabled;
504
506
505
	// --- Startup preferences ---
507
	// --- Startup preferences ---
506
	public static String StartupPreferencePage_label;
508
	public static String StartupPreferencePage_label;

Return to bug 107753