diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java index 765c496a6..21a7a4f8d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -15,7 +15,6 @@ import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.resource.CompositeImageDescriptor; import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.Point; /** @@ -49,8 +48,8 @@ public class LaunchConfigurationTabImageDescriptor extends CompositeImageDescrip @Override protected Point getSize() { if (fSize == null) { - ImageData data= getBaseImage().getImageData(); - setSize(new Point(data.width, data.height)); + CachedImageDataProvider provider = createCachedImageDataProvider(getBaseImage()); + setSize(new Point(provider.getWidth(), provider.getHeight())); } return fSize; } @@ -81,11 +80,7 @@ public class LaunchConfigurationTabImageDescriptor extends CompositeImageDescrip */ @Override protected void drawCompositeImage(int width, int height) { - ImageData bg= getBaseImage().getImageData(); - if (bg == null) { - bg= DEFAULT_IMAGE_DATA; - } - drawImage(bg, 0, 0); + drawImage(createCachedImageDataProvider(getBaseImage()), 0, 0); drawOverlays(); } @@ -94,10 +89,10 @@ public class LaunchConfigurationTabImageDescriptor extends CompositeImageDescrip */ protected void drawOverlays() { int flags= getFlags(); - ImageData data= null; + CachedImageDataProvider provider; if ((flags & ERROR) != 0) { - data= DebugUITools.getImage(IDebugUIConstants.IMG_OVR_ERROR).getImageData(); - drawImage(data, 0, 0); + provider = createCachedImageDataProvider(DebugUITools.getImage(IDebugUIConstants.IMG_OVR_ERROR)); + drawImage(provider, 0, 0); } } |