mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Fix for bug 468408
- Change to use the launcher plugin instead of the internal
Activator from org.eclipse.linuxtools.docker.ui
Change-Id: I55c5ee8a70714a76543b6deb029003c9d8a7862c
(cherry picked from commit e51f7256e5
)
This commit is contained in:
parent
216f842984
commit
36e50950b4
1 changed files with 10 additions and 6 deletions
|
@ -13,15 +13,16 @@ package org.eclipse.cdt.internal.docker.launcher;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.docker.launcher.DockerLaunchUIPlugin;
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.resource.ImageRegistry;
|
import org.eclipse.jface.resource.ImageRegistry;
|
||||||
import org.eclipse.linuxtools.docker.ui.Activator;
|
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
|
|
||||||
public class SWTImagesFactory {
|
public class SWTImagesFactory {
|
||||||
// The plug-in registry
|
// The plug-in registry
|
||||||
private static ImageRegistry imageRegistry = Activator.getDefault()
|
private static ImageRegistry imageRegistry = DockerLaunchUIPlugin
|
||||||
|
.getDefault()
|
||||||
.getImageRegistry();
|
.getImageRegistry();
|
||||||
|
|
||||||
// Sub-directory (under the package containing this class) where 16 color
|
// Sub-directory (under the package containing this class) where 16 color
|
||||||
|
@ -30,13 +31,16 @@ public class SWTImagesFactory {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
fgIconBaseURL = new URL(Activator.getDefault().getBundle()
|
fgIconBaseURL = new URL(
|
||||||
|
DockerLaunchUIPlugin.getDefault().getBundle()
|
||||||
.getEntry("/"), "icons/"); //$NON-NLS-1$ //$NON-NLS-2$
|
.getEntry("/"), "icons/"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
Activator.log(e);
|
DockerLaunchUIPlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private static final String NAME_PREFIX = Activator.PLUGIN_ID + '.';
|
|
||||||
|
private static final String NAME_PREFIX = DockerLaunchUIPlugin.PLUGIN_ID
|
||||||
|
+ '.';
|
||||||
private static final int NAME_PREFIX_LENGTH = NAME_PREFIX.length();
|
private static final int NAME_PREFIX_LENGTH = NAME_PREFIX.length();
|
||||||
public static final String IMG_DOCKER_SMALL = NAME_PREFIX
|
public static final String IMG_DOCKER_SMALL = NAME_PREFIX
|
||||||
+ "docker_small.gif"; //$NON-NLS-1$
|
+ "docker_small.gif"; //$NON-NLS-1$
|
||||||
|
@ -69,7 +73,7 @@ public class SWTImagesFactory {
|
||||||
try {
|
try {
|
||||||
return new URL(fgIconBaseURL, buffer.toString());
|
return new URL(fgIconBaseURL, buffer.toString());
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
Activator.log(e);
|
DockerLaunchUIPlugin.log(e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue