From 1e37aa628c6e341fffe93f50f27afe11cd10ac6e Mon Sep 17 00:00:00 2001 From: Alexander Fedorov Date: Mon, 15 Jul 2019 19:19:59 +0300 Subject: Bug 548799 - Replace usage of AbstractUIPlugin#imageDescriptorFromPlugin Use ResourceLocator#imageDescriptorFromBundle Change-Id: Iecd9472c60526e40774f776315e34d37a794e7e6 Signed-off-by: Alexander Fedorov --- .../ui/actions/breakpoints/OpenBreakpointMarkerAction.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'org.eclipse.debug.ui') diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java index aebb39bfd..ab90d0230 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -11,6 +11,7 @@ * Contributors: * IBM Corporation - initial API and implementation * Lars Vogel - Bug 426110 + * Alexander Fedorov - Bug 548799 *******************************************************************************/ package org.eclipse.debug.internal.ui.actions.breakpoints; @@ -20,6 +21,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.DelegatingModelPresentation; import org.eclipse.debug.internal.ui.IDebugHelpContextIds; import org.eclipse.debug.internal.ui.actions.ActionMessages; +import org.eclipse.jface.resource.ResourceLocator; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IEditorInput; @@ -30,7 +32,6 @@ import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.SelectionProviderAction; import org.eclipse.ui.ide.IDE; -import org.eclipse.ui.plugin.AbstractUIPlugin; public class OpenBreakpointMarkerAction extends SelectionProviderAction { @@ -41,8 +42,10 @@ public class OpenBreakpointMarkerAction extends SelectionProviderAction { public OpenBreakpointMarkerAction(ISelectionProvider selectionProvider) { super(selectionProvider, ActionMessages.OpenBreakpointMarkerAction__Go_to_File_1); setToolTipText(ActionMessages.OpenBreakpointMarkerAction_Go_to_File_for_Breakpoint_2); - setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui.ide", "icons/full/elcl16/gotoobj_tsk.png")); //$NON-NLS-1$ //$NON-NLS-2$ - setDisabledImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui.ide", "icons/full/dlcl16/gotoobj_tsk.png")); //$NON-NLS-1$ //$NON-NLS-2$ + ResourceLocator.imageDescriptorFromBundle("org.eclipse.ui.ide", "icons/full/elcl16/gotoobj_tsk.png") //$NON-NLS-1$ //$NON-NLS-2$ + .ifPresent(d -> setImageDescriptor(d)); + ResourceLocator.imageDescriptorFromBundle("org.eclipse.ui.ide", "icons/full/dlcl16/gotoobj_tsk.png") //$NON-NLS-1$ //$NON-NLS-2$ + .ifPresent(d -> setDisabledImageDescriptor(d)); PlatformUI.getWorkbench().getHelpSystem().setHelp( this, IDebugHelpContextIds.OPEN_BREAKPOINT_ACTION); -- cgit v1.2.3